Skip to main content

Simple premium bond checker library

Project description

Premium Bond Checker

CI PyPI version PyPI downloads License Ruff codecov

Simple premium bond checker library that is built against Nsandi.

Usage

Check the next draw date

You can check the next draw date, which is calculated from the first working day of the month.

from premium_bond_checker.client import Client

print(f"Next draw: {Client.next_draw()}")

Check the next draw date revealed by

Results are not always revealed when the results are drawn. It can take upto 3 additional days for this to happen.

from premium_bond_checker.client import Client
print(f"Next draw reveal by: {Client.next_draw_results_reveal_by()}")

Check results

Results can be checked either granular or on all data points.

from premium_bond_checker.client import Client

premium_bond_number = 'your bond number'

client = Client()

# 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-1.1.1.tar.gz (3.6 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-1.1.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for premium_bond_checker-1.1.1.tar.gz
Algorithm Hash digest
SHA256 6c6bdb4fc759c0729766a5f69805d6ae849dc6b9c04ffa8e78403eaf8ce7aff8
MD5 c9062f42900c0958b363f22937066058
BLAKE2b-256 540c8c8e949f92b8060012c5a1b8066ccab5305841be07245db32ab3f01b7ff1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for premium_bond_checker-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9f8bbd226190cd1e3244ec645dc9e09ca2b60f5fe02ab7c9b141ded4d0f31305
MD5 32715beaf70c3a8dd950db1c1242ff27
BLAKE2b-256 5347c48a36ecf52e1ca97e2f3ed61b28555c6bac5266e04bdba8d23da0948733

See more details on using hashes here.

Provenance

The following attestation bundles were made for premium_bond_checker-1.1.1-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