Python client for serval-dna REST interface
Project description
Python client for the serval-dna REST-interface
Provides a client to interact with serval-dna's REST-interface in python
Functionality
The following REST-functionality is supported:
- Keyring
- Rhizome
- MeshMS
- MeshMB
- Route
For documentation on the specific endpoints, please consult The serval-dna documentation
Dependencies
This code should run on both Python 2.7 and 3.4+
The only external runtime-dependency is requests. This should be automatically installed by pip based on the package metadata.
Development dependencies are the following:
Automatic format checking is done using black and pre-commit.
In order to run the tests, you will need hypothesis, pytest, and pytest-cov for coverage-reports.
To install all dependencies (both runtime and development/testing) run pip install -r requirements.txt
Installation
As of v0.4
, releases are uploaded to PyPi, so you can just install it by name
pip install pyserval
Development
In order to have reasonably well formatted code, a format-checking pre-commit hook is supplied. The tool used for checking/reformatting is black. Note that the hook itself does not do any reformatting, it merely informs you that a file is not properly formatted. You need to do the reformatting yourself using black $FILEPATH
.
The tests require you to have the servald
binary from serval-dna installed and available in your $PATH
. In order to have a consistent testing enviroment, /tmp/pyserval-tests/
will be used as the $SERVALINSTANCE_PATH
.
- Clone Project
- Install project to python-path
- You might want to use a virtualenv
- You might also want to do an editable install with
pip install -e .
- Install development dependencies with
pip install -r requirements.txt
- Install git pre-commit hook with
pre-commit install
- For testing: In the project root run
pytest --cov=pyserval
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 pyserval-0.4.1.tar.gz
.
File metadata
- Download URL: pyserval-0.4.1.tar.gz
- Upload date:
- Size: 24.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85237b71cb8d3f54236d06098c3645844c919679ab993a4b38e0286e221da03e |
|
MD5 | 891ef0a02d5ae1c4b4bee4f806198bcd |
|
BLAKE2b-256 | 5ea15849d5015ee594dea027680d297d91d651a0b51d96fc3868beec1775e2e7 |
File details
Details for the file pyserval-0.4.1-py2.py3-none-any.whl
.
File metadata
- Download URL: pyserval-0.4.1-py2.py3-none-any.whl
- Upload date:
- Size: 33.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1e6366e567ac37c5a6e7ce10fd8a7d43bdd6a6baec492f0dcf5e297bccb2449 |
|
MD5 | 8276b186d531a439ba74b610f989efe4 |
|
BLAKE2b-256 | 4a2ce18bf45561a53a53acc0da5d1ffc27ec8d1311661411e423584ee603995f |