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.4.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.4-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for drkbloodbarometer-0.1.4.tar.gz
Algorithm Hash digest
SHA256 1779366702dd72afe4294bdd540b9b935780d521e01dc1244f34a2cfcff412c6
MD5 ed124fa7ce8141b5f479553e4491edf0
BLAKE2b-256 5b605acffee6d03689b3ff9beea3736217fa1eb003026bd7466cb5efeefc0086

See more details on using hashes here.

Provenance

The following attestation bundles were made for drkbloodbarometer-0.1.4.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.4-py3-none-any.whl.

File metadata

File hashes

Hashes for drkbloodbarometer-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 482c1986b4678bb9b825ff94d096942236e683dd43c00d62c3222a4f364c1cdf
MD5 7c6a980015b8f7ddd5c51e975516d541
BLAKE2b-256 524bd18a8cea41feaa120da6e3ccfe0a2351855835694855b61e89f7cd9fe24d

See more details on using hashes here.

Provenance

The following attestation bundles were made for drkbloodbarometer-0.1.4-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