PyHPO-API
A HTTP REST-API wrapper for PyHPO
Main features
This package allows an easy setup of a REST API to interact with HPO Terms using the PyHPO package.
API Documentation
To see an interactive API documentation, install PyHPO-API, run the app and visit http://127.0.0.1:8000/docs
Installation / Setup
The easiest way to install PyHPO-API is via pip
pip install pyhpoapi
Usage
Getting started
The easiest way to get started is to run the API via
uvicorn pyhpoapi.main:app
Parallel processing
If you want better performance for parallel request handling, you can run PyHPO-API with multiple workers
uvicorn pyhpoapi.main:app --workers 15
CORS
If you need to allow cross-origin requests, you specify CORS settings through environment variables:
export PYHPOAPI_CORS_ORIGINS="*" export PYHPOAPI_CORS_METHODS="GET,POST" export PYHPOAPI_CORS_HEADERS="*"
Dev
Getting started for development
Clone the repository
git clone https://github.com/anergictcell/pyhpoapi.git
cd pyhpoapi
Use Docker for development
One way to do this is to run a docker container during development
docker run --rm -v $(pwd):/src -p 8000:8000 -it python:3.9-slim-buster bash
cd src
pip3 install -r requirements.txt
pip3 install -r requirements-dev.txt
python3 -m unittest discover tests
uvicorn --host 0.0.0.0 --reload pyhpoapi.main:app
Or local development without Docker
Create a virtual environment and install requirements in the virtual environment
virtualenv venv_pyhpoapi
source venv_pyhpoapi/bin/activate
pip3 install -r requirements.txt
pip3 install -r requirements-dev.txt
python3 -m unittest discover tests
uvicorn --reload pyhpoapi.main:app
Metadata
Release files for pyhpoapi 2.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 | |
|---|---|---|---|---|
| pyhpoapi-2.0.0.tar.gz | 44.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyhpoapi-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 89.1 kB
Release files / pyhpoapi-2.0.0.tar.gz
| Download URL | pyhpoapi-2.0.0.tar.gz |
|---|---|
| Size | 44.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
edd7ebac21a233008f28fd4a73e31e0b8c950fd18e3a365d1e516ab2867bd2b9
|
|
BLAKE2b-256 checksum How to use checksums |
78f6e91d1311af377afb952089a19ef6cc5733707f41c5275bc67473970c38ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / pyhpoapi-2.0.0-py3-none-any.whl
| Download URL | pyhpoapi-2.0.0-py3-none-any.whl |
|---|---|
| Size | 44.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
084b57ea12056f30846c1d061e9cdce16aca0bfd1b0ef7be69c75b908014cf4e
|
|
BLAKE2b-256 checksum How to use checksums |
a5dd1a5b5ff212bcf746a1c2e3297549c6e63cda4a98d801aaf61fd5c6d8103f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Security for pyhpoapi 2.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.