Skip to main content

Afvaldienst library

This library is meant to interface with mijnafvalwijzer.nl and/or afvalstoffendienstkalender.nl It is meant to use with home automation projects like Home Assistant.

Installation

.. code:: bash

pip install afvaldienst

Uninstallation

.. code:: bash

pip uninstall afvaldienst

Usage

.. code:: python

>>> from Afvaldienst import Afvaldienst
>>> provider = 'mijnafvalwijzer'
>>> api_token = ''
>>> zipcode = '1111AA'
>>> housenumber = '1'
>>> suffix = ''
>>> start_date = 'True or False'     (start counting wihth Today's date or with Tomorrow's date)
>>> trash = Afvaldienst(provider, api_token, zipcode, housenumber, suffix)

>>> trash.trash_json
[{'nameType': 'gft', 'type': 'gft', 'date': '2019-12-20'}, {'nameType': 'pmd', 'type': 'pmd', 'date': '2019-12-28'}]

>>> trash.trash_schedule
[{'key': 'pmd', 'value': '31-10-2019', 'days_remaining': 8}, {'key': 'restafval', 'value': '15-11-2019', 'days_remaining': 23}, {'key': 'papier', 'value': '20-11-2019', 'days_remaining': 28}]

>>> trash.trash_schedule_custom
[{'key': 'first_next_in_days', 'value': 8}, {'key': 'today', 'value': 'None'}, {'key': 'tomorrow', 'value': 'None'},

>>> trash.trash_types
['gft', 'kerstbomen', 'pmd', 'restafval', 'papier']

Or use the scraper:

>>>from AfvaldienstScraper import AfvaldienstScraper
>>> provider = 'mijnafvalwijzer'
>>> zipcode = '1111AA'
>>> housenumber = '1'
>>> start_date = 'True or False'     (start counting wihth Today's date or with Tomorrow's date)
>>> trash = AfvaldienstScraper(provider, zipcode, housenumber)

>>> trash.trash_schedule
[{'key': 'pmd', 'value': '31-10-2019', 'days_remaining': 8}, {'key': 'restafval', 'value': '15-11-2019', 'days_remaining': 23}, {'key': 'papier', 'value': '20-11-2019', 'days_remaining': 28}]

>>> trash.trash_schedule_custom
[{'key': 'first_next_in_days', 'value': 8}, {'key': 'today', 'value': 'None'}, {'key': 'tomorrow', 'value': 'None'},

>>> trash.trash_types
['gft', 'kerstbomen', 'pmd', 'textiel', 'restafval', 'papier']

>>>> trash.trash_types_from_schedule
['gft', 'papier', 'pmd', 'restafval', 'textiel', 'kerstbomen', 'today', 'tomorrow', 'day_after_tomorrow', 'first_next_in_days', 'first_next_item', 'first_next_date']

Contributors are most welcome

  • I'm still learning how to code properly.

.. :changelog:

Release History

1.0.6 (2020-09-21) ++++++++++++++++ New release

  • Remove unnecessary data

1.0.6 (2020-09-21) ++++++++++++++++ New release

  • Add scraper funcionality

1.0.5 (2020-09-21) ++++++++++++++++ Bugfix release

  • Multiple minor bugs regarding the new api from mijnafvalwijzer

1.0.4 (2020-09-16) ++++++++++++++++ Bugfix release

  • Add trash None value on no data

1.0.3 (2020-09-16) ++++++++++++++++ Bugfix release

  • add trash_schedule and trash_schedule_custom trash type list overview

1.0.2 (2020-09-16) ++++++++++++++++ Bugfix release

  • add trash_schedule and trash_schedule_custom trash type list overview

1.0.1 (2020-09-16) ++++++++++++++++ Bugfix release

  • remove api tokens (as requested by the provider(s))

1.0.0 (2020-09-15) ++++++++++++++++ Bugfix release

  • complete rewrite of the logic for parsing json data

0.8.0 (2020-09-13) ++++++++++++++++ Bugfix release

  • moved from json..nl to api..nl
  • added additional error handling

Metadata

Release files for afvaldienst 1.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for afvaldienst 1.1.4
File Size Uploaded Provenance Actions
afvaldienst-1.1.4.tar.gz 8.0 kB Without provenance Details for afvaldienst-1.1.4.tar.gz

Release files / afvaldienst-1.1.4.tar.gz

Download URL afvaldienst-1.1.4.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
45a0279444b1891e01cddfd4f9f103d1e5dad82d5a26edde10eec24ca175f544
BLAKE2b-256 checksum
How to use checksums
39922fbcf0d69c2ecca7081fa0e9ce1e83578eafd37e1e525a3c494b59ae0574
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.6

Security for afvaldienst 1.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page