A Python client library for the [ineep](https://codeberg.org/cmts/ineep) lakehouse API.
Project description
ineepy
A Python client library for the ineep lakehouse API — typed models, sync and async clients, streaming uploads/downloads, and ETag-based caching.
Links
- Repository: codeberg.org/Ineep/ineepy
- Documentation: ineep.codeberg.page/ineepy/
- Changelog: CHANGELOG.md
Requirements
- Python 3.12+
uv
Installation
uv add ineepy
Or for development:
git clone https://codeberg.org/Ineep/ineepy
cd ineepy
uv sync
Authentication
Exchange your credentials for a JWT token once — by default it is saved
to ineepy.toml in the current directory, so clients can be constructed
with no arguments afterwards:
from ineepy import Ineepy, get_token
# One-time: saves base_url, api_path and token to ./ineepy.toml
get_token('user@example.com', 'secret',
base_url='https://lakehouse.example.com')
client = Ineepy() # picks up ineepy.toml
Or keep the token in your hands and pass it explicitly:
token = get_token('user@example.com', 'secret', save_token=False)
client = Ineepy(token=token)
scopes accepts a single scope name or an iterable of names and
defaults to 'user'; request 'admin' for administrative operations.
An async variant, async_get_token, mirrors get_token exactly.
Quickstart
from ineepy import Ineepy
with Ineepy() as client:
user, etag = client.users.get('me')
namespaces = client.namespaces.list()
tables = client.tables.list('raw')
The same API is available asynchronously:
from ineepy import AsyncIneepy
async with AsyncIneepy() as client:
user, etag = await client.users.get('me')
namespaces = await client.namespaces.list()
tables = await client.tables.list('raw')
Working with data
Upload streams file-like objects straight from disk, query returns typed JSON rows, and large results stream directly to a file:
with Ineepy() as client:
# Streaming upload from an open file
with open('orders.parquet', 'rb') as f:
client.data.upload('raw.sales.orders', f, 'parquet')
# JSON query with filters
result = client.data.query('raw.sales.orders',
filters='country:eq:BR')
print(result.items)
# Large results: submit as parquet, stream to disk
job_id = client.data.submit_query('raw.sales.orders',
format='parquet')
client.data.poll_download_to(job_id, 'result.parquet')
Explicit write modes (append, overwrite, upsert), row deletion,
cross-table queries with joins, and job monitoring are covered in the
data documentation.
Configuration
Settings are resolved in priority order: constructor arguments →
ineepy.toml in the current directory → INEEPY_* environment
variables.
| Environment variable | Default | Description |
|---|---|---|
INEEPY_BASE_URL |
https://ineep-lakehouse-prod.exe.xyz |
API base URL |
INEEPY_API_PATH |
/api/v0 |
API path prefix |
INEEPY_TOKEN |
(empty) | Bearer token |
client = Ineepy(base_url='https://my-server.example.com', token=token)
Error handling
Every failure raises a subclass of ineepy.exceptions.IneepyError:
from ineepy.exceptions import NotFoundError
try:
table, etag = client.tables.get_metadata('raw.sales.ghost')
except NotFoundError as e:
print(f'missing table: {e}')
Concurrent updates are guarded by ETags — a stale etag raises
PreconditionFailedError instead of silently overwriting.
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() with no arg returns root namespaces |
tables |
client.tables |
Table schema and metadata management within namespaces |
data |
client.data |
Upload, JSON/parquet/csv queries, cross-table queries, streaming transfers, write modes (append, overwrite, upsert) |
Documentation
Development
make format # format code
make lint # lint and type-check code
make test # run unit tests with coverage
make test-e2e # run end-to-end tests against a live server
make docs # validate doc snippets against a live server, build site
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 request/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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ineepy-0.4.1.tar.gz.
File metadata
- Download URL: ineepy-0.4.1.tar.gz
- Upload date:
- Size: 22.3 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5925387942113cf861f6bd692020f50c7ff3337474069563b99584d391c0f837
|
|
| MD5 |
a43dca58c2f91e3054dc99315fe2fe1d
|
|
| BLAKE2b-256 |
e50ac6469446fcfbcc405ca284404cf76a2b54d73f121ccb20da75748a1c21a6
|
File details
Details for the file ineepy-0.4.1-py3-none-any.whl.
File metadata
- Download URL: ineepy-0.4.1-py3-none-any.whl
- Upload date:
- Size: 30.5 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51ab469af92ca9fbd306d859497a14eb5fcac8d84678737292954c77c2b461c5
|
|
| MD5 |
027498052039e1adbdec6ce71bb303ae
|
|
| BLAKE2b-256 |
80060eb1b89416261e581f607b45fadc596a9e7432c1a815ca6e849402aa7627
|