Skip to main content

PnotP client and API wrappers for the P¬P platform.

Project description

PnotP

Unified API and Python client for PathoVision vision models.

Packages

  • pnotp_api: FastAPI service that wraps PathoVision ensembles under a consistent /v1 surface 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.pnotp.ai
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.6.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pnotp-0.1.6-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file pnotp-0.1.6.tar.gz.

File metadata

  • Download URL: pnotp-0.1.6.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.4

File hashes

Hashes for pnotp-0.1.6.tar.gz
Algorithm Hash digest
SHA256 e8c1bdb869f6b8bbdfea475d8f0734696176210f3deb80590f52ec3c616a0c30
MD5 f71a6a454831cc33a88342c92e623413
BLAKE2b-256 66b55d26400e049c340d041f35b7a2aa8e8ec467747998444e5303d02ba2b1ed

See more details on using hashes here.

File details

Details for the file pnotp-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: pnotp-0.1.6-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

Hashes for pnotp-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f74b2a14a7692e9f8d0954c0fdd93d8b4d7d23db600f766d2671139b5f2c9b86
MD5 1f5a90c5b66db2b05700be1f8272072e
BLAKE2b-256 45895b4afecea5ceb8604e14676daf37ddaaa07d35b22eb8760b93e5a66d6cf7

See more details on using hashes here.

Supported by

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