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, delete)
api_keys client.api_keys API key management (create, list, revoke)
namespaces client.namespaces Namespace management (list, create, update, delete); list() with no arg returns root namespaces
tables client.tables Table schema management within namespaces
data client.data Upload, query, and explicit write modes: append, overwrite, upsert

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.3.1.tar.gz (17.7 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.3.1-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ineepy-0.3.1.tar.gz
  • Upload date:
  • Size: 17.7 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.3.1.tar.gz
Algorithm Hash digest
SHA256 61ac69ef40bcf2159112accd99f1409bb863d21d4dfb5ed46b812b3bda2a8fde
MD5 570e195ac9162cb8059d6e4557adb8cf
BLAKE2b-256 47ef47629c6abf493107919301740877ac53c83bc25477e7355a5476c24b9cf5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ineepy-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 25.3 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.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5b8722263b625ddde6bde4dd7cf9c16434450507953d173058ded6a557c09fce
MD5 e8c4a8888ab80cc69e9d425b7b3e82e3
BLAKE2b-256 435f19902fd6a35b884c9ab1f2c193d4dd36995ef8d662031031488f3ef0fa76

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