File: example.py

package info (click to toggle)
python-openerz-api 0.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 128 kB
  • sloc: python: 253; makefile: 7; sh: 5
file content (12 lines) | stat: -rw-r--r-- 378 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
from openerz_api.main import OpenERZConnector

ZIP = 8001
WASTE = "paper"

# initialize the connector given zip code and waste type
connector = OpenERZConnector(zip_code=ZIP, waste_type=WASTE)

# retrieve the next pick-up date within a period of choice
next_pickup = connector.find_next_pickup(day_offset=15)

print(f"Next pickup date for {WASTE} in {ZIP} area: {next_pickup}")