Skip to main content

A Python client for the PharmaAPI

Project description

PharmaAPI Python Client

A Python client library for the PharmaAPI - search and retrieve pharmaceutical data from French and US databases.

Installation

pip install pharma-api-client

Quick Start

from pharma_api_client import PharmaAPIClient

# Initialize client
client = PharmaAPIClient(
    base_url="https://api.pharmadb.example.com",
    api_key="your-api-key"
)

# Search for products
response = client.search_by_ingredient("aspirin", limit=10)

# Convert to pandas DataFrame
df = response.to_df()
print(df.head())

# Clean up
client.close()

Features

  • 🔍 Search by name, ingredient, dosage form, strength
  • 💊 Get product details by CIS ID or RxNorm code
  • 💰 Access pricing information (French and US)
  • 🔬 Professional tier: ATC codes, NDC lookup, US product names
  • 📊 Easy DataFrame conversion with .to_df()
  • 🛡️ Type hints and comprehensive error handling

Documentation

See the tutorial notebook for detailed examples.

Requirements

  • Python 3.7+
  • requests
  • pandas

License

MIT License

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

pharma_api_client-0.1.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

pharma_api_client-0.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file pharma_api_client-0.1.0.tar.gz.

File metadata

  • Download URL: pharma_api_client-0.1.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for pharma_api_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0b31687ea02749f9a08dc4113355c7c56bbd256c5ec35415988ad88038b5b819
MD5 39dc2dee55059a7e2cd5651d89c9b50c
BLAKE2b-256 342a7ee41ee68114b17d486275c3616e56ba0b7fc3465091ee509578ad015942

See more details on using hashes here.

File details

Details for the file pharma_api_client-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pharma_api_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f4753c1e65aabea32ed08453caa93b56bca31aaf3ab18770697e9405eabb5aeb
MD5 fcc17ee46bacde59612b695c223bac41
BLAKE2b-256 0a75c05e074fd7e04c201387a9a2f46c1b19961b72752956d225b69216fef83f

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