fhirclient
A flexible client for FHIR servers supporting the SMART on FHIR protocol
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction: pure Python wheel with only requests as a runtime dependency.
- Actively maintained with recent commits and stable production status.
License · maintenance · safety
permissive license (permissive) — Permissive license allows use in both open-source and proprietary projects without significant restrictions.
last release 2026-02-10 (185 days) · last repo commit 2026-04-13 · 694 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 330,970 downloads/mo, #7,523 on PyPI
Alternatives
Verify before relying
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)- 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.
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 on this page. Verify before relying on it.
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
fhirclient on PyPI
Before you install
Low friction: pure Python wheel with only requests as a runtime dependency. Actively maintained with recent commits and stable production status.
Requires Python 3.10 or later.
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)
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 | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagerequests |
| Maintenance | Actively maintained 185 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 330,970 / month, #7,523 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Software Development :: Libraries :: Python Modules |
Evidence: fhirclient-4.4.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “smart on fhir”
- fhirclientA Python client library for connecting to FHIR servers and working…
- fhir.resourcesProvides Python classes and validation for all FHIR resource types…
- fhir-coreProvides Pydantic V2-based abstract base classes and primitive…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also fhir.resources · fhirpy · fhir-core · carelytics · oauth2-client · requests-oauth2client · oauth2client · Flask-OAuthlib · Authlib · oauth2