Skip to main content

A library for DRK blood donation service stock levels.

Project description

DRK Blood Barometer

A python library that extract the current levels of donated blood from the website of a given states DRK (German red cross) website.


Ruff


Installation

pip install drkbloodbarometer

Usage

from drkbloodbarometer import DRKBloodBarometer

bb = DRKBloodBarometer("Baden-Würtemberg")

print(bb.bloodlevels)
print(bb.lastChange)

The result looks like this

{
    "A+": {"level": 29.4, "warning": False, "rating": "Kritisch"},
    "B+": {"level": 37.2, "warning": False, "rating": "Kritisch"},
    "AB+": {"level": 38.4, "warning": False, "rating": "Kritisch"},
    "0+": {"level": 16.2, "warning": False, "rating": "Bedrohlich"},
    "A-": {"level": 16.2, "warning": False, "rating": "Bedrohlich"},
    "B-": {"level": 29.4, "warning": False, "rating": "Kritisch"},
    "AB-": {"level": 36.0, "warning": False, "rating": "Kritisch"},
    "0-": {"level": 15.6, "warning": True, "rating": "Kritisch"},
}
2025-03-20 00:00:00

Supported states

Not all states offer a blood barometer, therefore not all are supported (yet).

  • Baden-Würtemberg: Yes

  • Berlin: Yes

  • Brandenburg: Yes

  • Bremen: Yes

  • Hamburg: Yes

  • Hessen: Yes

  • Mecklenburg-Vorpommern: Yes

  • Niedersachsen: Yes

  • Sachsen: Yes

  • Sachsen-Anhalt: Yes

  • Schleswig-Holstein: Yes

  • Thüringen: Yes

  • Bayern: No

  • Nordrhein-Westfalen: No

  • Rheinland-Pfalz: No

  • Saarland: No

Disclaimer

The author is not in any way affiliated with DRK. This library is neither offered nor supported by DRK. The authors do not take any liability for possible damages.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

drkbloodbarometer-0.1.3.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

drkbloodbarometer-0.1.3-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file drkbloodbarometer-0.1.3.tar.gz.

File metadata

  • Download URL: drkbloodbarometer-0.1.3.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for drkbloodbarometer-0.1.3.tar.gz
Algorithm Hash digest
SHA256 67396979668af01226ce69bf8d511b07b677fb62729dcad669e0353892b72136
MD5 6eda4e5e376c9ca58488faa14ed4ee7c
BLAKE2b-256 37093d00b75c501e22aa4c13ad3ae8fb153d826be49e311ba4cc5494487f176d

See more details on using hashes here.

Provenance

The following attestation bundles were made for drkbloodbarometer-0.1.3.tar.gz:

Publisher: publish-to-pypi.yml on Bouni/drkbloodbarometer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file drkbloodbarometer-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for drkbloodbarometer-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 61fa3ae50cbbf17438f3eb6671eb3f04588b0c7c203b2fc59d43ae48d03a8675
MD5 e209309bc1cdc35eb3ca022f14510816
BLAKE2b-256 e617605f44fd4599b682fec833acbafa4a4a837a86e6ded4d076b379006c4c9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for drkbloodbarometer-0.1.3-py3-none-any.whl:

Publisher: publish-to-pypi.yml on Bouni/drkbloodbarometer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page