Registry / serialization / sphn
library0.2.1pypypi✓ verified 79d ago

A Python library for working with the SPHN (Swiss Personalized Health Network) data model. Version 0.2.1. Enables creation, validation, and serialization of SPHN-compliant RDF data. Currently in early development with frequent releases.

pip install sphn
INSTALL
IMPORT
SIG · SPHN
S
sphn
serializationpythonv0.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DatasetIter
from sphn import DatasetIter
from sphn import SPHNProject
DatasetReader
from sphn import DatasetReader
read
from sphn import read

Create a new SPHN project, add a patient, and serialize as RDF/Turtle.

from sphn import SPHNProject from datetime import datetime project = SPHNProject() patient = project.create_patient(patient_id='P001', birth_date=datetime(1990, 4, 23)) project.add_patient(patient) rdf = project.to_rdf() print(rdf.serialize(format='turtle'))
Debug
Known issues
gotchaThe library is in early development (v0.2.1). API may change drastically between versions. Pin your dependency to a specific version.
fix
Use 'sphn==0.2.1' in requirements.txt.
affects: all
gotchaThe 'sphn' package name on PyPI is very short and could be confused with other projects. Ensure you are installing the correct package.
fix
Always install via 'pip install sphn' and verify version >=0.2.0.
affects: all
Upgrade
Version history
0.2.1latest on PyPI · released Jan 7, 2026
Audit
Dependencies
rdflibrequiredRDF graph handling
pyshacloptionalSHACL validation
Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources
sphn — pip install sphn · libregistry