--- id: fhirclient version: "4.4.0" license: unclear license_treatment: permissive maintenance: active --- # fhirclient — A flexible client for FHIR servers supporting the SMART on FHIR protocol License: permissive · Maintenance: active · Downloads: 331.0K/mo ## What it is and what it does fhirclient is a Python library that connects your code to FHIR (Fast Healthcare Interoperability Resources) servers—the standard format for electronic health records. It handles both the network communication and the data model, so you can read patient records, search for encounters or procedures, and work with healthcare data in a Pythonic way. The library supports SMART on FHIR, which means it can manage OAuth login flows for protected servers, and it includes pre-built classes for common FHIR resources like Patient, Encounter, and Procedure. You use it by creating a FHIRClient with your server URL, then calling methods on resource classes to fetch or search for data. The library validates data structure as you build or deserialize FHIR objects, catching schema errors early. It's actively maintained, requires only requests as a dependency, and supports current Python versions. Use it for: - Fetch a patient's demographics and medical history from a SMART-enabled EHR for display in a web or mobile app. - Search for all encounters or procedures for a patient within a given date range and process the results. - Build a Flask or Django app that logs users in via SMART OAuth and displays their own health data. - Validate and serialize FHIR data objects when building healthcare integrations or data pipelines. - Query a public FHIR sandbox server for research or testing without authentication setup. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A Python client library for connecting to FHIR servers and working with FHIR healthcare data, supporting the SMART on FHIR protocol for OAuth-based authentication and resource queries. Yes. The library is actively maintained, has no known vulnerabilities, installs with minimal friction, and is the standard choice for FHIR + SMART integration in Python. Use it if you need to connect to FHIR servers or work with FHIR data models in Python. ## Install pip install fhirclient uv add fhirclient poetry add fhirclient ## Installing fhirclient Before you install: Low friction: pure Python wheel with only requests as a runtime dependency. Actively maintained with recent commits and stable production status. License in practice: Permissive license allows use in both open-source and proprietary projects without significant restrictions. Quickstart: pip install fhirclient from fhirclient import client from fhirclient.models.patient import Patient settings = {'app_id': 'my_app', 'api_base': 'https://r4.smarthealthit.org'} smart = client.FHIRClient(settings=settings) patient = Patient.read('patient-id', smart.server) print(patient.birthDate.isostring) Requires Python 3.10 or later. Verify before relying: - Whether the library handles FHIR versions beyond R4 (4.0.1) in current releases. - Performance characteristics when querying large result sets or performing bulk operations. - Specific OAuth flow support details and limitations for different SMART server implementations. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 331.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags fhir client python, smart on fhir, healthcare data api, fhir server connection, medical records python, clinical data access, fhir resource queries, healthcare-data, fhir-standard, oauth-client [View on SkillFed](https://skillfed.io/packages/fhirclient) · [View on PyPI](https://pypi.org/project/fhirclient/)