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=v1   # 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.1.1.tar.gz (15.1 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.1.1-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ineepy-0.1.1.tar.gz
  • Upload date:
  • Size: 15.1 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.1.1.tar.gz
Algorithm Hash digest
SHA256 46c79b7f5fba8ecbfdf9c341494c7827b6bc764d7a464fdd5a6b8a80c24ed2ba
MD5 36b2baccbaaa159b53f1c97ec87b7755
BLAKE2b-256 9718c92f7df084a3ab038198ce12c1bc7fc125782fa591178c272f3496659010

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ineepy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 22.4 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0cb79d539c51e36f4963962c3a4704dde6281f01fdb92b787f0a6e45449c3207
MD5 51aedbde3eea6877b39e1fa1b1af50b7
BLAKE2b-256 0bb5143ba859f2d896780e70575a8396176bde9863a0a47b1174e592bb43a18d

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