Skip to main content
fhirsnake Image

fhirsnake: turn static files to a FHIR server

image

What is it?

fhirsnake is a minimalistic FHIR server that serve yaml and json files as FHIR resources

How it works?

The server reads all yaml and json files from resources directory. Rsources directory should have subdirectories with names equal resource types:

resources/
├── Patient/
│   ├── example.yaml
│   ├── john-doe.json
│   └── patient3.yaml
├── Questionnaire/
│   ├── questionnaire1.yaml
│   ├── questionnaire2.yaml
│   └── questionnaire3.yaml

Supported operations

[!IMPORTANT] All created and updated resources persist in runtime only. All changes are vanished after service restart

  • read, create and update operations are supported
  • search - limied support without any search params
  • GET /$index operation returns a map of all resources in format <resource_type>:<id>

How to use?

  1. Organize resources in a directory
  2. Adjust source destination in Dockerfile.resources if required
  3. Option A: Run a container
    docker run -p 8002:8000 -v ./resources:/app/resources  bedasoftware/fhirsnake
    
  4. Option B: Build an image using the base image
    docker build -t fhirsnake-resources:latest -f Dockerfile.resources .
    docker run -p 8000:8000 fhirsnake-resources 
    

Contribution and feedback

Please, use Issues

Development

Format and fix with ruff

ruff format
ruff check . --fix

Issue new version - run semantic release locally

npx semantic-release --no-ci

Publish to pypi

poetry build
poetry publish

Release files for fhirsnake 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fhirsnake 1.1.0
File Size Uploaded
fhirsnake-1.1.0.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fhirsnake 1.1.0
File Interpreter ABI Platform
fhirsnake-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.2 kB

Release files / fhirsnake-1.1.0.tar.gz

Download URL fhirsnake-1.1.0.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ac5d6d4ff9e0c72cdba66fb6a3b762146c91cf4a59cb1e188b0ba6991bfe4736
BLAKE2b-256 checksum
How to use checksums
58fad75484bcf3dc6d4e2d621f3c639c845448cc09be29aaec6945abc384d435
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.3 Darwin/23.6.0

Release files / fhirsnake-1.1.0-py3-none-any.whl

Download URL fhirsnake-1.1.0-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0f0cbb98e9f0dd4520ce161b6374a5bba91db427d6fc39f24d3c94c78d26372
BLAKE2b-256 checksum
How to use checksums
150d053e88ae28f632154a2d46bbda9702155d33d19aa586f6b7d333d4ddf786
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.3 Darwin/23.6.0

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page