Skip to main content

Folketinget

Folketinget is an intuitive Python client for the Danish Parliament API. It simplifies accessing and querying parliamentary data, making it easy to integrate into your projects (it is still in super beta mode).


Installation

Install the package via pip:

pip install folketinget

Usage

After installing, you can start using the client in your Python code. The main class to interact with is Folketinget, which provides access to various API endpoints. Currently, only the "Sag" endpoint is supported with two query methods.

1. Get Latest Updated IDs Since a Given Timestamp

To retrieve the IDs of "Sag" records updated after a specific timestamp:

import datetime
from folketinget import Folketinget

# Initialize the client
client = Folketinget()

# Define the timestamp (e.g., yesterday)
yesterday = datetime.datetime.today() - datetime.timedelta(days=1)

# Retrieve the IDs of cases updated since yesterday
updated_ids = client.sag.get_latest_updated_ids_since(timestamp=yesterday)

print("Updated IDs since yesterday:", updated_ids)

2. Get a Fixed Number of Latest Updated IDs

To retrieve a specified number of the most recently updated "Sag" records:

from folketinget import Folketinget

# Initialize the client
client = Folketinget()

# Retrieve the 10 most recent updated case IDs
latest_ids = client.sag.get_n_latest_updated_ids(n=10)

print("10 latest updated case IDs:", latest_ids)

Authors

  • Kasper Junge
  • Jonas Høgh Kyhse-Andersen

Metadata

Release files for folketinget 0.1.1

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

Source distribution (sdist)

Source distribution for folketinget 0.1.1
File Size Uploaded Provenance
folketinget-0.1.1.tar.gz 39.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for folketinget 0.1.1
File Interpreter ABI Platform
folketinget-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 48.9 kB

Release files / folketinget-0.1.1.tar.gz

Download URL folketinget-0.1.1.tar.gz
Size 39.6 kB
Tags Source
SHA-256 checksum
How to use checksums
24ffacc1b8a4dcd62be26057198f4a09f9f2f7d80138afa86eb48fd1b81a1e4d
BLAKE2b-256 checksum
How to use checksums
455278db5c537f4766e6f5b4e31dbf9992a49156cc6eb60daea4db9a606b17cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.4

Release files / folketinget-0.1.1-py3-none-any.whl

Download URL folketinget-0.1.1-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd3c019d7cf3a92740152cf608eca39c5bffb5eb9b2a840ef2f930cda0155e14
BLAKE2b-256 checksum
How to use checksums
d2ab8864d29e4db485629a2f256d21383c2367f6939b44a85eee0d7afc24d837
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.4

Security for folketinget 0.1.1

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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