orderlyweb-api
Python client for OrderlyWeb.
Initial use case is to run a report only.
Usage
Instantiate the OrderlyWebAPI class, providing base url and bearer token as parameters:
api = OrderlyWebAPI('http://localhost:8080', 'H2AAbjvhjbbhbhjlh')
The bearer token must be obtained externally to this client. Use the Montagu Python client to obtain a token by authenticating with Montagu.
To run a report:
api.run_report(report_name, report_paraneters, timeout)
where report_parameters is a dictionary or JSON string, and timeout is an
integer. Timeout sets a timeout for the report run in seconds, after which the
run will be halted. The default timeout is 600.
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, and OrderlyWeb) 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.
Publishing configuration can be found in setup.py, and any classes, methods etc which should be accessible to users of the package
must be added to orderlyweb_api/__init__.py.
Remember to increment version in setup.py before publishing a new build.
To publish:
- Delete the following folders:
.eggs,build,dist,orderlyweb_api.egg-info. - Build the package with:
python3 setup.py sdist bdist_wheel - Publish with:
python3 -m twine upload dist/*
To use the OrderlyWebAPI class as a client of the package, include orderlyweb-api in your requirements.txt. Import with
import orderlyweb_api, and instantiate the API class with orderlyweb_api.OrderlyWebAPI(url, token)
See general instructions for publishing Python packages here.
Some troubleshooting tips for publishing Python packages can be found in the consellations repo.
Metadata
Release files for orderlyweb-api 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| orderlyweb-api-1.0.0.tar.gz | 7.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| orderlyweb_api-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.0 kB
Release files / orderlyweb-api-1.0.0.tar.gz
| Download URL | orderlyweb-api-1.0.0.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6373974574fc6177c1cd24f820910ac891761ae6c7399dff3979b8ba2a7e078
|
|
BLAKE2b-256 checksum How to use checksums |
1320a11bdef8158d13d414700005247bd35c67d99c79076814b94e266e9bc638
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / orderlyweb_api-1.0.0-py3-none-any.whl
| Download URL | orderlyweb_api-1.0.0-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f41ba6bc322b91a59ac18fdf74d606d8d13100bcf230cc3e0e5f3215d6bb075e
|
|
BLAKE2b-256 checksum How to use checksums |
2175f39754d11aa680962c8503730fe4656f8c17bbf71b09b58829cf064e8667
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Security for orderlyweb-api 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.