Client for rhizo-server
Project description
rhizo-client
This is a client library for communicating with rhizo-server.
Installation
For ordinary usage, the library may be installed using pip (pip install rhizo-client
).
To work on the library itself, install it in editable mode (pip install -e .
) which will install the required dependencies.
To use a local copy of the library in a different project, install it in editable mode.
cd /path/to/other/project
pip install -e /path/to/rhizo-client
Configuration
The rhizo controller reads a config.yaml
file and optionally local.yaml
file in the current directory.
Typically the config.yaml
file can be stored in version control while local.yaml
contains system-specific
settings and items such as secret keys that should not be in version control. Entries in the local.yaml
file
override settings in config.yaml
.
A minimal sample configuration file (sample_config.yaml
) is included in the distribution.
Alternately, config values can be set in environment variables. The variables should be upper-case forms of the config keys with a prefix of RHIZO_
. For example, RHIZO_SERVER_NAME
for the server_name
setting.
The values are parsed as YAML to allow structured values to be specified in the environment. (JSON is valid YAML, so you can use JSON format too.) One specific gotcha to be cautious of is that strings containing colons will need to be enclosed in quotation marks or they'll be interpreted as a key/value pair.
export RHIZO_SERVER_NAME='"localhost:5000"'
Tests
There are two test directories: tests
contains standalone tests and tests_with_server
has tests that require a running rhizo-server instance.
To run the standalone tests, first install the test dependencies (you only need to do this once):
pip install -r tests/requirements.txt
Then run pytest tests
.
To run the server-based tests, create tests_with_server/local.yaml
with your server settings and run pytest
from the tests_with_server
directory.
(Note: currently this requires some steps to be completed on the server; we'll work on streamlining/documenting this.)
Packaging
To build a package for public release, follow the usual procedure:
pip install wheel
python setup.py sdist bdist_wheel
The project is configured to build as a universal wheel since it supports both Python 2 and Python 3 and does not include compiled extensions.
To upload new releases to PyPI, see the Python packaging documentation.
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
File details
Details for the file rhizo-client-0.1.5.tar.gz
.
File metadata
- Download URL: rhizo-client-0.1.5.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f24935ef2e5055708cde920bda36c0d672d4761c42569b3993b29fd0265fc43d |
|
MD5 | f94144a2f941fea99995ecf4e6f1334e |
|
BLAKE2b-256 | 709451a1e2a60c136015370a1e8657298336945c0583796e827e91a303c3b58c |
File details
Details for the file rhizo_client-0.1.5-py2.py3-none-any.whl
.
File metadata
- Download URL: rhizo_client-0.1.5-py2.py3-none-any.whl
- Upload date:
- Size: 19.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 294df6ede9975f93612f1a3c369f20749e512204ad067deb15bbca5791386bbf |
|
MD5 | 703790e7932ebfe2400889bb26ada415 |
|
BLAKE2b-256 | 7259108d00c09acb385077bf548a29ad40b9c24ad8203330b5889e4d3c8a2b6c |