Skip to content

Releases: OMOPHub/omophub-python

v1.2.0

09 Dec 18:14

Choose a tag to compare

v1.0.1

03 Dec 13:30

Choose a tag to compare

Full Changelog: v1.0.0...v1.0.1

v1.0.0

03 Dec 09:52

Choose a tag to compare

The official Python SDK for https://omophub.com - a medical vocabulary API providing access to OHDSI ATHENA standardized vocabularies.

Features

Core Functionality

  • Sync & Async Support - Full async/await support with AsyncOMOPHub client
    alongside synchronous OMOPHub client
  • Type Safety - Comprehensive TypedDict definitions for all API responses with full
    IDE autocomplete support
  • Automatic Retries - Configurable retry logic for transient failures with
    exponential backoff
  • HTTP/2 Support - Automatic HTTP/2 when available for improved performance

##Resources

Concepts

  • Get single concepts by ID or vocabulary code
  • Batch retrieve multiple concepts (up to 1000 per request)
  • Autocomplete suggestions for concept search
  • Related concepts with configurable relatedness types
  • Concept relationships with filtering

Search

  • Basic text search with vocabulary and domain filters
  • Advanced search with faceted results
  • Semantic search for natural language queries
  • Fuzzy search with typo tolerance
  • Auto-pagination iterator for seamless large result set handling

Hierarchy

  • Get concept ancestors with configurable depth
  • Get concept descendants with filtering options
  • Support for custom relationship types

Mappings

  • Get concept mappings to target vocabularies
  • Batch mapping operations
  • Mapping quality scores included

Vocabularies

  • List all available vocabularies with statistics
  • Get vocabulary details and domain coverage
  • Vocabulary statistics and metadata

Domains

  • List all OMOP CDM domains
  • Get domain statistics
  • Browse concepts by domain

Error Handling

  • Typed exception hierarchy:
    • NotFoundError - Resource not found (404)
    • AuthenticationError - Invalid API key (401)
    • RateLimitError - Rate limit exceeded with retry-after (429)
    • ValidationError - Invalid request parameters (400)
    • ServerError - Server-side errors (5xx)
    • ConnectionError - Network connectivity issues
    • TimeoutError - Request timeout

Configuration

  • API key via constructor, environment variable (OMOPHUB_API_KEY), or module-level
    setting
  • Configurable base URL, timeout, and retry settings
  • Vocabulary version pinning support

Requirements

  • Python 3.10+
  • Dependencies: httpx>=0.27.0, typing_extensions>=4.5.0

Documentation