The dbnl Python client SDK
Project description
dbnl-sdk
Python SDK development repo
V0 SDK
V0 SDK are under src
To build SDK, run the following command in the root directory
python -m build
Development
Setup
We develop the SDK on the lowest supported Python version: 3.9. We use pyenv to manage Python version.
pyenv install 3.9.20
Setting up the virtual environment with virtualenv
PYENV_VERSION=3.9 pyenv exec python -m venv --prompt . venv
source venv/bin/activate
Install dev dependencies.
pip install -e '.[dev]'
If working on the eval package, install eval dependencies.
pip install -e '.[eval]'
Use pre-commit to enforce code quality standards before unformatted code makes it to CI.
Hooks can be installed to run before each commit with the following command:
pre-commit install --install-hooks
Testing
To run all the unit tests in the repo:
make test
To manually run all pre-commit checks on all files in the repo:
pre-commit run --all-files
Integration Tests
This repo also supplies a suite of integration tests, though they are not currently comprehensive (please, make a PR to improve!).
To run the integration tests, you'll need to set the DBNL_API_URL and DBNL_API_TOKEN env vars. Unless you are testing something specific,
you can just use https://api.dev.dbnl.com and your own DBNL auth token (get one in DEV here if you need one).
DBNL_API_URL="https://api.dev.dbnl.com" DBNL_API_TOKEN=$AUTH_TOKEN make integration-tests
Note that this does technically have some side effects in DEV -- it will archive existing integration test projects in our default namespace and create new ones with the same names (along with creating some runs and such within some of those projects).
Documentation
We use sphinx for generating documentation from docstrings. All of our SDK methods should have corresponding docstrings.
Make sure your docs are readable and formatted properly! See ./docs/README.md for instructions on building the documentation locally.
Releasing the SDK
As the intention is to make this repository open-source in the future, deployment documentation is kept separately. For convenience and clarity, you can find the instructions here. We should remove this before publicizing the repo.
Project details
Release history Release notifications | RSS feed
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 dbnl-0.19.1.tar.gz.
File metadata
- Download URL: dbnl-0.19.1.tar.gz
- Upload date:
- Size: 54.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ec8228414f15c28f8a81de4bd7527b261c76f9f2edf3978fa410f43e96f2953
|
|
| MD5 |
b90da916d2f6a38db206105a80da296b
|
|
| BLAKE2b-256 |
78a717c2663c36be846e0f5df481a9eb71f14f05c6c421679656d81c27958624
|
File details
Details for the file dbnl-0.19.1-py3-none-any.whl.
File metadata
- Download URL: dbnl-0.19.1-py3-none-any.whl
- Upload date:
- Size: 65.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69219cf3bedea59f619d4dfbfc9e623ebd4c88d0d6855c190b74a2b1ef0039a7
|
|
| MD5 |
3e009daaf8351498d0f4dc68b9079a4a
|
|
| BLAKE2b-256 |
185dd055cbcac0abf96347ad824c1c59252b487319e860b9711746b90e066203
|