Skip to main content

Get the next waste pickup schedule from Borås Energi och Miljö.

Project description

Project generated with PyScaffold

Borås Energi och Miljö Waste Collection

Simple package to get the schedule for upcoming waste pickups.

Example

import asyncio
import aiohttp
from borasem_waste import auth,borasem

valid_address = 'Validated address from async_get_address()'
search_address = 'Any address to search on.'

async def main():

    async with aiohttp.ClientSession() as session:

        authObj = auth.Auth(session)
        api = borasem.BorasEM(authObj)

        # Get Waste Schedule
        schedule = await api.async_get_schedule(valid_address)

        # Print states
        for scheduleEntry in schedule:
            print(f"The entry {scheduleEntry.containerId} is being picked up at {scheduleEntry.NextWastePickup}")

        # Get Waste Schedule
        addressList = await api.async_get_address(search_address)

        # Print states
        for address in addressList:
            print(address)

asyncio.run(main())

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

borasem-waste-0.0.5.tar.gz (22.9 kB view hashes)

Uploaded Source

Built Distribution

borasem_waste-0.0.5-py3-none-any.whl (8.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page