Skip to main content

A simple library for the SSAM Waste Schedule API written in Python 3.

Project description

SSAM Waste Schedule Library

A simple library for the SSAM Waste Schedule API written in Python 3.

SSAM (Södra Smålands Avfall & Miljö) is a Swedish Waste Management company. They empty their customers trash bins on a pre-defined schedule. This library will fetch the schedule from their API and present it to the user through a few simple classes and properties, wrapped inside a Python package.


Install the latest version with pip3:

$ pip3 install ssamwaste


Building ID

Every household has a building ID attached to it. This ID is what's used to query the API for the schedule associated with an address.

If it's the first time you are using this library and you don't know the building ID of your address you must start by finding out your building ID:

from ssam import ssam

ssam = ssam.WasteScheduler()

buildings = ssam.search_building('Storgatan 1')

# The search results are returned in a list
for building in buildings:

You can access the address, city and building ID as properties on a building object, like this:

>>> building.address
'Storgatan 1'


from ssam import ssam

ssam = ssam.WasteScheduler()

# The get_waste_bins() method require a Building ID. It returns a list of WasteBin objects.
for waste_bin in ssam.get_waste_bins(12345):

You can access the properties of the WasteBin object, like this:

>>> bin.next_waste_pickup
>>> bin.waste_pickups_per_year
>>> bin.waste_type
>>> bin.waste_pickup_frequency
'Tömning varannan vecka fredag jämn vecka helår'
>>> bin.bin_code
>>> bin.bin_size
>>> bin.bin_unit
>>> bin.bin_container_type
>>> bin.number_of_bins
>>> bin.is_active
>>> bin.description
'Kärl 180 l 14-dagarstömning'
>>> bin.building_id

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

ssamwaste-1.0.1.tar.gz (5.0 kB view hashes)

Uploaded Source

Built Distribution

ssamwaste-1.0.1-py3-none-any.whl (5.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