Skip to content

Getting started

Requirements

  • Python 3.12 or higher
  • uv package manager

Installation

Install ineepy using uv:

uv add ineepy

For development, clone the repository and install in editable mode:

git clone https://codeberg.org/ineep/ineepy
cd ineepy
uv sync

Configuration

ineepy resolves configuration in the following order (highest priority first):

  1. Constructor argumentsbase_url, api_path, token passed directly to Ineepy() or AsyncIneepy()
  2. Config fileineepy.toml in the current working directory
  3. Environment variablesINEEPY_BASE_URL, INEEPY_API_PATH, INEEPY_TOKEN

Default values

  • base_url: https://ineep-lakehouse-prod.exe.xyz
  • api_path: /api/v0
  • token: ''

Environment variables

Variable Description Example
INEEPY_BASE_URL Base URL of the ineep server https://my-ineep.example.com
INEEPY_API_PATH API version path segment /api/v1
INEEPY_TOKEN JWT token for authentication eyJhbGc...

Config file

The ineepy.toml file stores credentials and settings:

base_url = "https://ineep-lakehouse-prod.exe.xyz"
api_path = "/api/v0"
token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

This file is created automatically by get_token() (unless save_token=False).

First usage

from ineepy import get_token, Ineepy

get_token(
    email='user@ineep.org.br',
    password='Secret123',
    scopes=['user', 'viewer'],
)

with Ineepy() as client:
    user, etag = client.users.get('me')
    print(f'Logged in as {user.username} ({user.email})')
    namespaces = client.namespaces.list(namespace_id='processed')

Authentication

ineepy uses JWT authentication. Obtain a token with get_token() before using the client.

get_token(
    email='user@ineep.org.br',
    password='Secret123',
    scopes=['user', 'viewer'],
)

Scopes

Scopes restrict what a user can access. Always request only the minimum scopes needed.

Scope Capabilities
'user' Access own profile and API keys
'admin' Full administrative access: manage users
'viewer' Read access to namespaces, tables, and data
'editor' Write access to namespaces, tables, and data

Token persistence

By default get_token() writes the token to ineepy.toml for reuse. To disable:

token = get_token(
    email='user@ineep.org.br',
    password='Secret123',
    save_token=False
)

with Ineepy(token=token) as client:
    user, etag = client.users.get('me')
    print(f'Logged in as {user.username} ({user.email})')

Environment variables

export INEEPY_BASE_URL="https://my-ineep.example.com"
export INEEPY_API_PATH="/api/v0"
export INEEPY_TOKEN="eyJhbGc..."

Then use the client without explicit arguments:

with Ineepy() as client:
    user, etag = client.users.get('me')
    print(f'Logged in as {user.username} ({user.email})')
Warning

The ineepy.toml file takes precedence over environment variables. Make sure you don't have an ineepy.toml in your current working directory if you intend to use environment variables.