A package to gather waste collection details for UK addresses served by Cardiff Council.
Project description
cardiffwaste
About
This is a highly-juvenile package to collect upcoming waste collections for an addresses served by Cardiff Council.
Installation
''' pip install cardiffwaste '''
Usage
Currently you are required to know your Unique Property Reference Number (UPRN), this can easily be found on https://www.findmyaddress.co.uk/search. The example below uses 123456789012
from cardiffwaste import WasteCollections
address = WasteCollections(123456789012)
collections = address.get_collections()
print(collections.general.collection_date)
# 2022-01-15
Four collection types are currently handled, which are general
, recycling
, food
, garden
. If a collection date was found, each collection type will have the loaded
attribute set to True
. loaded = False
means no collection is scheduled. For scheduled collections, each collection will have the following attributes:
Attribute | Type | Description | Only present when loaded |
---|---|---|---|
loaded |
bool |
Indicates if collection details were found | No |
type |
str |
The collection type (general , recycling , food , or garden ) |
No |
collection_date |
datetime.date |
Date of next collection | Yes |
collection_type |
str |
scheduled or rescheduled depending on if planned has been missed |
Yes |
image |
str |
URL of a representation of the collection type | Yes |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cardiffwaste-0.1.0b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5f318a6fa5be863535183684bc4bffb0f085a0c846748af27c633393503ca87 |
|
MD5 | d5087d6823684e887dc87bddfab530f7 |
|
BLAKE2b-256 | 1a27f12ff5dc67fb169774420b837da15327d41689d6751ad2a8a1ce18f16a97 |