Skip to main content

PolisenAPI

PyPI version License Python

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
)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

polisen_api-0.0.2.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

polisen_api-0.0.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file polisen_api-0.0.2.tar.gz.

File metadata

  • Download URL: polisen_api-0.0.2.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for polisen_api-0.0.2.tar.gz
Algorithm Hash digest
SHA256 9c4de3d316446cec77680a2a352180c4531144502dedf92df77d6557d4f5f0fb
MD5 0ce7c393bc1370fa488420c069f52dad
BLAKE2b-256 ec6a32ecd2b965f13cd263d74f6ddfa93f1a8cae190cb0fb97e8dcdddffdd18d

See more details on using hashes here.

File details

Details for the file polisen_api-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: polisen_api-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for polisen_api-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 81fdb980efaae08c4c9b55dfb67f8045dd5aa2754ab09055137b95be04f61b4e
MD5 38c7facb78d6f2152d1582e3ac7ae37c
BLAKE2b-256 636ef336c8420140835be1bf8c9e7d8391c939949546ca9457ff57116378f798

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page