Python client for Montagu API
Project description
montagu-py
Python client for Montagu API.
Initial use case is for authentication only.
Usage
The client currently supports authenticating with Montagu, and a single example endpoint.
To authenticate, instantiate the MontaguAPI
class, providing base url, username and password as parameters:
api = MontaguAPI('http://localhost:8080', 'test.user@example.com', 'password')
The Montagu authentication token can be accessed on the api object:
token = api.token
The example endpoint returns a list of all diseases:
diseases = api.diseases()
Development
Clone the repo anywhere and install dependencies with (from the repo root):
pip3 install --user -r requirements.txt
Run dependencies (a local copy of Montagu API and database) with scripts/run-dev-dependencies.sh
. This will also
add a test user to Montagu.
Testing
Run dependencies as described above, then run pytest
Publishing
This repository is published to PyPI.
Building and publishing is done manually, with local sources. See general instructions for publishing Python packages here.
Publishing configuration can be found in setup.py
. Remember to increment version
when publishing a new build.
Some troubleshooting tips for publishing Python packages can be found in the consellations 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
File details
Details for the file montagu-0.0.3.tar.gz
.
File metadata
- Download URL: montagu-0.0.3.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b55462edc441e90535bf96971368521756c3987dc5ebc074a5b14220a310ece |
|
MD5 | f07c020897eff6644e6d99e4cf8dc68b |
|
BLAKE2b-256 | ed9849a34ab0272e8628656f81090256a9f856d3d700796b805ec006ff8ef27f |
File details
Details for the file montagu-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: montagu-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 818f72ea3b257fd6776a8b056908b87177f68e124c096a33e61701a0aa641127 |
|
MD5 | aed59df954f15fdff9b237e5b316eba0 |
|
BLAKE2b-256 | 9ee48431fcae545f6f80c3c5d02801054e1e730e6e50b00d5661df0fa71e8947 |