Skip to main content

pyIntradel

PyPI - License PyPI PyPI - Python Version

A python connector for waste collection for province of Liège. This connector is using screen scraping to collect following data (for the current year), in json:

  • "Green bin" (organic waste) and "black bin" residual waste
    • Total weight
    • Number of collections
    • details of all the collections
    • chip number
    • starting date (01/01 of the current year)
  • Recypark
    • details of all the visits
    • (01/01 of the current year)

Here is an example of json:

[
    {
        "name": "ORGANIQUE",
        "start_date": "01-01-2022",
        "id": "123456",
        "details":
        [
            {
                "date": "20-01-2022",
                "detail": "34.0"
            },
            {
                "date": "17-02-2022",
                "detail": "27.0"
            },
            {
                "date": "07-04-2022",
                "detail": "36.0"
            }
        ],
        "total": "97"
    },
    {
        "name": "RESIDUEL",
        "start_date": "01-01-2022",
        "id": "78810",
        "details":
        [
            {
                "date": "20-01-2022",
                "detail": "14.5"
            },
            {
                "date": "07-04-2022",
                "detail": "11.5"
            },
            {
                "date": "21-04-2022",
                "detail": "11.5"
            }
        ],
        "total": "37.5"
    },
    {
        "name": "RECYPARC",
        "start_date": "01-01-2022",
        "id": "RECYPARC",
        "details":
        [
            {
                "date": "14-04-2022",
                "detail": "Encombrants (0.35 m³), Petits Bruns (0.00 pièce)"
            }
        ],
        "total": "1"
    }
]

Usage

The intradel.be login form is protected by an invisible reCAPTCHA, so this library cannot log in by itself. Authenticate once in a real browser, then pass the resulting session cookie (the raw Cookie header, e.g. PHPSESSID=...).

Errors raised by api.get_data, all subclasses of api.IntradelError (itself a ValueError):

  • api.AuthenticationError: the cookie has expired or is invalid; log in again in the browser and use the new cookie.
  • api.ApiError: unexpected HTTP status, available as .status.
  • api.ParseError: the page structure is not the expected one, likely after a website change.

Python module

import aiohttp
from pyintradel import api

async with aiohttp.ClientSession() as sess:
    await api.get_data(sess, cookie)

Command line

python3 -m pyintradel.main --cookie "PHPSESSID=..."

Development

The project uses uv:

uv sync                  # create .venv with the dev tools from uv.lock
uv run pytest
uv run ruff check
uv run ruff format
uv run mypy
uv build                 # sdist and wheel in dist/

Install the git pre-commit hook once per clone; it runs ruff (lint with autofix, format) and checks that uv.lock matches pyproject.toml before each commit:

uv tool install pre-commit
pre-commit install
pre-commit run --all-files   # optional: run the hooks on the whole repository

CI runs the same checks plus mypy and the tests, so skipping the hook only delays the feedback.

To release, publish a GitHub release whose tag is the new version (e.g. 0.1.0): the version is derived from the tag, and CI publishes to PyPI once the checks pass.


Buy Me A Coffee

Metadata

Release files for pyIntradel 0.1.0

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

Source distribution (sdist)

Source distribution for pyIntradel 0.1.0
File Size Uploaded Provenance Actions
pyintradel-0.1.0.tar.gz 294.1 kB With provenance Details for pyintradel-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyIntradel 0.1.0
File Interpreter ABI Platform Actions
pyintradel-0.1.0-py3-none-any.whl Python 3 none any Details for pyintradel-0.1.0-py3-none-any.whl

Total release size: 301.7 kB

Release files / pyintradel-0.1.0.tar.gz

Download URL pyintradel-0.1.0.tar.gz
Size 294.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c67be8a8f650793dc1e6cb30b94ed7057609674419e9ba3ea77bd3ea3547aef7
BLAKE2b-256 checksum
How to use checksums
378579d66f6f31891399cc77424b78e8a6371845b92ade605bd553fbf1607072
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Release files / pyintradel-0.1.0-py3-none-any.whl

Download URL pyintradel-0.1.0-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ffcfb3dd6ffa4e45ac45613c1b9724fcea6a2f8f8d8b26163ea674d1590a9424
BLAKE2b-256 checksum
How to use checksums
3f2ec9ab1a9eebf2af42021a31e2bb781afe060f9c105173b7ee40f32498c701
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Security for pyIntradel 0.1.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyintradel-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

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