Skip to main content

Simple premium bond checker library

Project description

Premium Bond Checker

CI PyPI version PyPI downloads License Code style: black codecov

Simple premium bond checker library that is built against Nsandi.

Usage

from premium_bond_checker.client import Client

premium_bond_number = 'your bond number'

client = Client()

# Getting next draw date
next_draw = client.next_draw()
print(f"Next draw: {next_draw}")

# Check if you've won
result = client.check(premium_bond_number)
print(f"Winning: {result.has_won()}")

# More granular breakdown
result_this_month = client.check_this_month(premium_bond_number)
print(f"This Month Winning: {result_this_month.won}")
print(f"This Month Header: {result_this_month.header}")
print(f"This Month Tagline: {result_this_month.tagline}")

result_last_six_months = client.check_last_six_months(premium_bond_number)
print(f"This Month Winning: {result_last_six_months.won}")
print(f"This Month Header: {result_last_six_months.header}")
print(f"This Month Tagline: {result_last_six_months.tagline}")

result_check_unclaimed = client.check_unclaimed(premium_bond_number)
print(f"This Month Winning: {result_check_unclaimed.won}")
print(f"This Month Header: {result_check_unclaimed.header}")
print(f"This Month Tagline: {result_check_unclaimed.tagline}")

License

MIT

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

premium_bond_checker-0.4.4.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

premium_bond_checker-0.4.4-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file premium_bond_checker-0.4.4.tar.gz.

File metadata

  • Download URL: premium_bond_checker-0.4.4.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for premium_bond_checker-0.4.4.tar.gz
Algorithm Hash digest
SHA256 31a189f986a503e2b3f03d83a408348f1a30a5a6853d7c2878c90edb680298cb
MD5 1b4a23446b49e983e58e446dea95b8b2
BLAKE2b-256 cfc0288dc02abe28f7bb52c1cddcc6d5b2d271fa097a432a442877e48632c4cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for premium_bond_checker-0.4.4.tar.gz:

Publisher: publish.yml on inverse/python-premium-bond-checker

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

File details

Details for the file premium_bond_checker-0.4.4-py3-none-any.whl.

File metadata

File hashes

Hashes for premium_bond_checker-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f9faf4e15cc560a6a93f07421bc62abc6ea605a64c307cd442c0d69be702e401
MD5 319855d8acea284a9d9343007a2f37d0
BLAKE2b-256 6c6eeaa77175188989bbcbba9daf2cd5e1e5f86c5b301a76cdc5c150d8c30781

See more details on using hashes here.

Provenance

The following attestation bundles were made for premium_bond_checker-0.4.4-py3-none-any.whl:

Publisher: publish.yml on inverse/python-premium-bond-checker

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