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-1.0.1.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-1.0.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pharma_api_client-1.0.1.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-1.0.1.tar.gz
Algorithm Hash digest
SHA256 4aa55ee21d4bfd27e318c223f0c7c9eccdaed7280fc570024f708ca7c9b8c421
MD5 72e771370ce7c0d548849c804aefd4d2
BLAKE2b-256 2f546449124a4b81fe0804cfe7abae91260b8d4aca7bdcd393f4c15626bde862

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pharma_api_client-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa48f635047dff88dc015725b1ad46ae5bf48ffe7ef4163a6e94e8dd1dca9b6c
MD5 114e6d1112199b8fc065eed657cf004e
BLAKE2b-256 bfdc389d82529934712061e8a2147e9af7c62919cd7ed876cac08411aae5d653

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