A client library for accessing the Nile API
Project description
Installing
The Nile Python SDK is available on PyPI, and can be installed via:
pip install nile-api
(in a virtual environment as appropriate).
Usage
Usage examples of the SDK can be found in the Nile examples repository, within the directories with -python in their name.
Development
Commands below generally make use of nox (in some sense a Python-based, testing-centric make).
You can install it by following its install instructions for your OS, or e.g. on macOS, by simply running:
brew install nox
Regenerating (updating) the client is done via openapi-python-client.
To do so, run:
nox -s regenerate
You will want to test the results. First, validate that the client generated with the expected structure (packages and modules):
To do so, run:
nox -s tests
Then you’ll want to do a quick smoke test and make sure the client actually works against Nile. Currently we do it by running https://github.com/TheNileDev/examples/tree/main/quickstart-python example. Before running it you’ll want to make sure that running the example will use the local client and not an installed one.
From the local nile-py repository directory run:
export PYTHONPATH=`pwd`:$PYTHONPATH
venv/bin/python -c "import nile_api; print(str(nile_api.__path__))"
cd ../examples/quickstart-python
./venv/bin/python src/all.py
We pin the version of this generator itself in a requirements file. To update the version of the generator that will be used, run:
nox -s update_openapi_requirements
which should regenerate the openapi-generator-requirements.txt file which you should then commit.
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
File details
Details for the file nile_api-0.2.5.tar.gz
.
File metadata
- Download URL: nile_api-0.2.5.tar.gz
- Upload date:
- Size: 40.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3ec7dea541eee5f050bfee86005153c103f705a0cb6cefe442d6ba9a4adfe0c |
|
MD5 | abfb18f4ed6fcc52623cca2ce9795daa |
|
BLAKE2b-256 | f6bfdef734d3a434a82372e5951112103bfe90ef1443a15b747e13b1ef81bd21 |
File details
Details for the file nile_api-0.2.5-py3-none-any.whl
.
File metadata
- Download URL: nile_api-0.2.5-py3-none-any.whl
- Upload date:
- Size: 108.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4054628f03985fa043b0a11b8f4787747d8faba7196133fff8ff33d2b376bee |
|
MD5 | 07003288c36fbb63f9287d3d11c79ae6 |
|
BLAKE2b-256 | ac4549764bd631ce43fd98117a90f46b2c74930ec0de1c0ce2e6b1cbf971632d |