fhirsnake: turn static files to a FHIR server
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 /$indexoperation returns a map of all resources in format<resource_type>:<id>
How to use?
- Organize resources in a directory
- Adjust source destination in
Dockerfile.resourcesif required - Option A: Run a container
docker run -p 8002:8000 -v ./resources:/app/resources bedasoftware/fhirsnake
- 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)
| File | Size | Uploaded | |
|---|---|---|---|
| fhirsnake-1.1.0.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|