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.2.tar.gz (4.1 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.2-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: drkbloodbarometer-0.1.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.9

File hashes

Hashes for drkbloodbarometer-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1ade70dd2d72a523b98ae8d5d0f8f24d538999f04cbc35b51e5b7b2c1ee57f46
MD5 3f15a5dc759326a21caf76d93407c2e5
BLAKE2b-256 5cba53e1c956b7a72b8b4e61228fd73253d47618c88209f618db866e8a275e5c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for drkbloodbarometer-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ca7df8b12ed4e9587358ac581fbdb7a7034c0dbe5d3773bda1018a8626930041
MD5 64ca1ac5766bae59f71bddc85ab55f00
BLAKE2b-256 60b26fadc9af8e3652f3fabef826407544816b9871fbcfbbdfad73c0bdc61217

See more details on using hashes here.

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