Skip to main content

Python client for Montagu API

Project description

montagu-py

Build Status codecov.io

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

montagu-0.0.3.tar.gz (2.9 kB view hashes)

Uploaded source

Built Distribution

montagu-0.0.3-py3-none-any.whl (4.3 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page