Skip to main content

A Python client library for the [ineep](https://codeberg.org/cmts/ineep) lakehouse API.

Project description

ineepy

status-badge

A Python client library for the ineep lakehouse API.

Links

Requirements

  • Python 3.14+
  • uv

Installation

uv add ineepy

Or for development:

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

Usage

Authentication

Obtain a JWT token before creating a client:

from ineepy import get_token, async_get_token

# Synchronous
token = get_token(email='user@example.com', password='secret')

# Async
token = await async_get_token(email='user@example.com', password='secret')

The scope parameter defaults to 'user'. Use 'admin' for administrative operations.

Synchronous client

from ineepy import Ineepy, get_token

token = get_token(email='user@example.com', password='secret')

with Ineepy(token=token) as client:
    user, etag = client.users.me()
    namespaces = client.namespaces.list()
    tables = client.tables.list(namespace_id='my-namespace')

Async client

from ineepy import AsyncIneepy, async_get_token

token = await async_get_token(email='user@example.com', password='secret')

async with AsyncIneepy(token=token) as client:
    user, etag = await client.users.me()
    namespaces = await client.namespaces.list()

Configuration

The base URL defaults to http://localhost:8000 and can be overridden via environment variable or constructor argument:

export INEEPY_BASE_URL=https://my-server.example.com
export INEEPY_API_VERSION=v0   # default
client = Ineepy(base_url='https://my-server.example.com', token=token)

Resources

Resource Access Description
users client.users User management (list, get, create, update, deactivate)
api_keys client.api_keys API key management (create, list, revoke)
namespaces client.namespaces Namespace management (list, get, create, update, delete)
tables client.tables Table schema management within namespaces
data client.data Data upload, download, update, query, and job polling

Development

make format   # format code
make lint     # lint code
make test     # run unit tests with coverage
make test-e2e # run end-to-end tests against a live server

E2E tests

E2E tests require a running ineep server and admin credentials:

cp .env.example .env
# edit .env with your credentials
make test-e2e

The .env file is gitignored. See .env.example for the available variables.

Project structure

src/ineepy/          Main package
  _auth.py           Token acquisition (sync + async)
  _client.py         Ineepy and AsyncIneepy clients
  _config.py         Pydantic settings (env vars)
  _exceptions.py     Exception hierarchy
  _models.py         Pydantic response models
  exceptions.py      Public exceptions re-export
  helpers.py         Public helper utilities
  models.py          Public models re-export
  _resources/        Per-resource implementations
    api_keys.py
    data.py
    namespaces.py
    tables.py
    users.py
tests/
  resources/         Unit tests per resource
  e2e/               End-to-end workflow tests
scripts/             Shell scripts called by make
pyproject.toml       Project metadata and tool config

License

This project is licensed under the GNU General Public License v3.0.

You are free to use, modify, and distribute this software under the terms of the GPL v3. Any derivative work must also be distributed under the same license. See the LICENSE file for the full license text.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ineepy-0.2.0.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ineepy-0.2.0-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file ineepy-0.2.0.tar.gz.

File metadata

  • Download URL: ineepy-0.2.0.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ineepy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5bd2911f91dcb6985a85b6825a657490d6da88dbb1002a2fbf280ac512f4bc13
MD5 6c8a276fd6330a7e4276f2dabfaf3172
BLAKE2b-256 c32201e2652258e7709df5cc91d4a9d45165d53b7256df911b34d0f67a8b383f

See more details on using hashes here.

File details

Details for the file ineepy-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ineepy-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ineepy-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7509fac0301a168ed1033b402622a1a6592606b84570f509588515570c8c825a
MD5 3a5dd731bbddcf564ca112a56b4b7bf5
BLAKE2b-256 13d141b4d52f8c8c06336a3c1d7058e9b2bbf43614507f7c8387dc454ed38ade

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page