fhir-core
FHIR Core library
Decision gist · record as of 2026-08-14
Yes. Active maintenance, no security vulnerabilities, low install friction, and permissive licensing make it a solid foundation for FHIR work in Python. Install if you are building healthcare applications that need FHIR resource modeling and serialization; skip if you only need to parse pre-built FHIR libraries without defining custom models.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with only pydantic as a runtime dependency.
- Actively maintained with a release 20 days ago and no known vulnerabilities.
- Supports Python 3.8 through 3.14.
License · maintenance · safety
BSD license (permissive) — BSD license (permissive) allows use in commercial and private projects with minimal restrictions; attribution required but no copyleft obligations.
last release 2026-07-25 (20 days) · last repo commit 2026-07-25 · 20 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,991,286 downloads/mo, #3,378 on PyPI
Alternatives
Verify before relying
pip install fhir-core
from pydantic import Field
from fhir_core.fhirabstractmodel import FHIRAbstractModel
from fhir_core.types import IdType, StringType
class Organization(FHIRAbstractModel):
__resource_type__ = "Organization"
id: IdType = Field(None, alias="id", json_schema_extra={"element_property": True})
name: StringType = Field(None, alias="name", json_schema_extra={"element_property": True})
org = Organization.model_validate({"id": "org-1", "name": "Acme Corp"})
org_json = org.model_dump_json()- Whether XML/YAML serialization requires additional system dependencies beyond Python and pydantic.
- Performance characteristics when handling large FHIR resource hierarchies or batch operations.
- Compatibility guarantees with specific FHIR specification versions (R4, R5, etc.).
What it is and what it does
fhir-core is a Pydantic V2-based toolkit for constructing FHIR resource models in Python. It provides FHIRAbstractModel as a base class for any FHIR resource, along with a library of FHIR primitive datatypes (IdType, BooleanType, StringType, etc.) and factories to construct complex datatypes. The package handles validation, serialization to and from JSON, XML, and YAML, and supports FHIR-specific features like the _summary filter for selective serialization.
The library was originally developed to support fhir.resources but is designed for standalone use. It integrates tightly with Pydantic's field validation and model configuration, allowing developers to define FHIR-compliant resource classes declaratively. Recent releases have focused on fixing precision issues with Decimal types, XML serialization edge cases, and multi-version FHIR support within a single process.
Use it for
- Define custom FHIR resource classes (e.g., Organization, Patient, Encounter) with validated fields and type safety.
- Serialize FHIR models to JSON or XML for interoperability with healthcare systems and EHR platforms.
- Validate incoming FHIR data against schema constraints and FHIR-specific rules before processing.
- Build healthcare data pipelines that parse and transform FHIR resources across multiple formats.
- Integrate FHIR support into Python-based health IT applications without writing low-level validation logic.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Active maintenance, no security vulnerabilities, low install friction, and permissive licensing make it a solid foundation for FHIR work in Python. Install if you are building healthcare applications that need FHIR resource modeling and serialization; skip if you only need to parse pre-built FHIR libraries without defining custom models.
Install
fhir-core on PyPI
Before you install
Low friction: pure Python wheel with only pydantic as a runtime dependency. Actively maintained with a release 20 days ago and no known vulnerabilities. Supports Python 3.8 through 3.14.
License in practice
BSD license (permissive) allows use in commercial and private projects with minimal restrictions; attribution required but no copyleft obligations.
Quickstart
pip install fhir-core
from pydantic import Field
from fhir_core.fhirabstractmodel import FHIRAbstractModel
from fhir_core.types import IdType, StringType
class Organization(FHIRAbstractModel):
__resource_type__ = "Organization"
id: IdType = Field(None, alias="id", json_schema_extra={"element_property": True})
name: StringType = Field(None, alias="name", json_schema_extra={"element_property": True})
org = Organization.model_validate({"id": "org-1", "name": "Acme Corp"})
org_json = org.model_dump_json()
Verify before relying
- Whether XML/YAML serialization requires additional system dependencies beyond Python and pydantic.
- Performance characteristics when handling large FHIR resource hierarchies or batch operations.
- Compatibility guarantees with specific FHIR specification versions (R4, R5, etc.).
Package facts
| License | BSD license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagepydantic |
| Maintenance | Actively maintained 20 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,991,286 / month, #3,378 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 :: DevelopersIntended Audience :: EducationIntended Audience :: Healthcare IndustryIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Typing :: Typed |
Evidence: fhir_core-1.1.10-py2.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 › “fhir resource model builder”
- fhir-coreProvides Pydantic V2-based abstract base classes and primitive…
- fhirpyAsync/sync FHIR client for Python that provides CRUD operations over…
- fhir.resourcesProvides Python classes and validation for all FHIR resource types…
Give your agent the search over MCP, or paste the wish link into any chat.
More Application Frameworks packages
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Textual is a Python framework for building cross-platform user interfaces that run in the terminal or web browser using a modern, component-based API.
Install it if you're developing CLI tools, dashboards, or interactive terminal applications.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Build and connect to Model Context Protocol servers that expose tools, resources, and prompts to LLM applications over stdio, HTTP, or SSE transports.
Install it if you need to build or connect to servers.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
See also fhir.resources · fhirclient · hl7apy · fhirpy · hl7 · carelytics · xsdata-pydantic · jsonschema-pydantic · dydantic · databind.core