PnotP client and API wrappers for PathoVision models.
Project description
PnotP
Unified API and Python client for PathoVision vision models.
Packages
pnotp_api: FastAPI service that wraps PathoVision ensembles under a consistent/v1surface with API-key auth.pnotp: Python client for calling the PnotP API.
Install (client only)
pip install pnotp
Install (client + server extra)
pip install "pnotp[server]"
Usage (client)
import pnotp as pnp
client = pnp.client(api_key="YOUR_KEY") # default base URL: https://api.pathovision.ai/v1
client.models()
model = client.models("pneumonia_binary_classification")
result = model.predict("image.jpg")
heatmap = model.attention_map("image.jpg")
Set your key once per shell:
export PNOTP_API_KEY="your_api_key_here"
python your_script.py # pnp.client() will read the env var automatically
Run the API locally
export PNOTP_INTERNAL_SECRET="dev-secret"
export PATHOVISION_ROOT="/absolute/path/to/PathoVision" # if not default
uvicorn pnotp_api.main:app --host 0.0.0.0 --port 8000
Issue an API key (internal)
curl -X POST http://127.0.0.1:8000/internal/api-keys \
-H "X-Internal-Secret: $PNOTP_INTERNAL_SECRET" \
-H "Content-Type: application/json" \
-d '{"user_external_id":"demo-user","plan_code":"pathovision_starter"}'
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
pnotp-0.1.3.tar.gz
(71.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pnotp-0.1.3-py3-none-any.whl
(12.9 kB
view details)
File details
Details for the file pnotp-0.1.3.tar.gz.
File metadata
- Download URL: pnotp-0.1.3.tar.gz
- Upload date:
- Size: 71.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e4b443803baec2d5fbd75947c133ee99c15d5f806906127b76e730d205b18df
|
|
| MD5 |
19ca7a048f3f98067e69db46d9a6bd98
|
|
| BLAKE2b-256 |
c6d0839cbcdc50f8fe7afaf2e8a2dd51b8471e17686b025735b50747069f1f74
|
File details
Details for the file pnotp-0.1.3-py3-none-any.whl.
File metadata
- Download URL: pnotp-0.1.3-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b94665df161d3e0267123dc46a57fb38571e2c082afc1d66cb7d81fb9d19902e
|
|
| MD5 |
c1ac4f15d817e34e59ec78114eb7c234
|
|
| BLAKE2b-256 |
abcd6e46463f6a0e8ff75ed73d58726454edb001edfd48a9ddbe2a98bb636413
|