PolisenAPI
PolisenAPI is a Python wrapper for polisen.se, which allows you to search and filter for events published by the Swedish police.
Install
PolisenAPI is available on PyPI.
uv add polisen-api
pip install polisen-api
Usage
from polisen_api import PolisenAPI
from datetime import date
api = PolisenAPI()
# Get all events (500 latest)
api.get_events()
# Filter by date, locations and types.
api.get_events(
date=date(2026, 1, 10),
locations=["Stockholm", "Norrköping"]
types=["Trafikolycka", "Inbrott"] # types can be found by browing the api response
)
Metadata
Release files for polisen-api 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| polisen_api-0.0.2.tar.gz | 3.0 kB | Without provenance | Details for polisen_api-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| polisen_api-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for polisen_api-0.0.2-py3-none-any.whl |
Total release size: 6.9 kB
Release files / polisen_api-0.0.2.tar.gz
| Download URL | polisen_api-0.0.2.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c4de3d316446cec77680a2a352180c4531144502dedf92df77d6557d4f5f0fb
|
|
BLAKE2b-256 checksum How to use checksums |
ec6a32ecd2b965f13cd263d74f6ddfa93f1a8cae190cb0fb97e8dcdddffdd18d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / polisen_api-0.0.2-py3-none-any.whl
| Download URL | polisen_api-0.0.2-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
81fdb980efaae08c4c9b55dfb67f8045dd5aa2754ab09055137b95be04f61b4e
|
|
BLAKE2b-256 checksum How to use checksums |
636ef336c8420140835be1bf8c9e7d8391c939949546ca9457ff57116378f798
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for polisen-api 0.0.2
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.