Skip to main content

pkpdsim: building blocks of PBPK/PD models

GitHub Actions CI/CD Status Documentation Version Python Versions MIT License

pkpdsim is a python package with the building blocks shared by physiologically based pharmacokinetic and pharmacodynamic (PBPK/PD) models in SBML. The models of pkdb_models are written in python with the factory of sbmlutils and simulated with sbmlsim; what they share lives in pkpdsim, so that the folder of a model imports nothing but itself and released packages.

Features include

  • templates and annotations - the creators and the terms of use of a model, the annotations of the compartments which recur in the models (liver, kidneys, gut, blood, urine, ...)
  • study data - the study folders of PK-DB in a checkout of pkdb_data, found through the environment variable PKDB_DATA, and the data of a model collected from them into its own folder
  • initial values - the same initial concentration or amount of a substance in every tissue of a model, which removes the distribution kinetics
  • licenses - the texts of CC BY-SA 4.0 and MIT for the COMBINE archive of a model, written byte for byte the same on every platform
  • models and their commands - the model object and the commands of a model (run, fit, report, identifiability), the tests of a model as functions and the verification of a change (pkpdsim-verify)

The documentation is available at https://matthiaskoenig.github.io/pkpdsim.

If you have any questions or issues please open an issue.

Quickstart

from pathlib import Path

from pkpdsim.annotations import compartments
from pkpdsim.licenses import License, write_license
from pkpdsim.templates import creators

print(creators[0].givenName, creators[0].familyName)
print([resource for _, resource in compartments["li"]])

results = Path("results")
results.mkdir()
print(write_license(results, License.MIT, copyright="2026 Matthias König").name)
Matthias König
['fma/FMA:7197', 'bto/BTO:0000759', 'ncit/C12392']
mit.txt

The user guide of the documentation describes every module with a snippet which runs.

How to cite

If you use pkpdsim please cite the archived software on Zenodo, whose DOI is added here with the first release.

Installation

pkpdsim requires python >= 3.13 and is available from pypi:

uv add pkpdsim

or with pip

pip install pkpdsim

See Installation for details and Development for working on the repository.

License

Funding

Matthias König is supported by the German Research Foundation (DFG) within the Research Unit Programme FOR 5151 "QuaLiPerF (Quantifying Liver Perfusion-Function Relationship in Complex Resection - A Systems Medicine Approach)" by grant number 436883643 and by grant number 465194077 (Priority Programme SPP 2311, Subproject SimLivA).

Matthias König was supported by the Federal Ministry of Education and Research (BMBF, Germany) within the research network Systems Medicine of the Liver (LiSyM, grant number 031L0054).

© 2026 Matthias König.

Metadata

Release files for pkpdsim 0.3.2

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

Source distribution (sdist)

Source distribution for pkpdsim 0.3.2
File Size Uploaded
pkpdsim-0.3.2.tar.gz 239.8 kB Details

Built distribution (wheel)

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

Total release size: 290.9 kB

Release files / pkpdsim-0.3.2.tar.gz

Download URL pkpdsim-0.3.2.tar.gz
Size 239.8 kB
Tags Source
SHA-256 checksum
How to use checksums
28e6f428ace1a8792ffb1857484cbf70581d9d621c114a8c21bedd38537cd133
BLAKE2b-256 checksum
How to use checksums
bb7be45246d646157d08e8c0a601724356ea094d9ba178f239e689ec0fe53c5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / pkpdsim-0.3.2-py3-none-any.whl

Download URL pkpdsim-0.3.2-py3-none-any.whl
Size 51.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d5aa462f0358cc98637e6a626379b4f06806e1764776887247a5cfc09f85d51
BLAKE2b-256 checksum
How to use checksums
529e0966fd692f6f0c3d5f2985d5cba23fb89eec8142a04b526a6619c09900c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

This release

0.3.2 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.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