Skip to main content

Python wrapper client for the Oireachtas public API

Project description

Oireachtas API Wrapper

Python client maintained by Aaron Bowman for the public Oireachtas API. The package exposes thin helper classes that make it easy to call official endpoints for legislation, debates, members, questions, and other parliamentary data.

Features

  • Lightweight wrappers around the official Oireachtas REST endpoints
  • Optional convenience wrapper for resolving endpoint names to URLs
  • Basic error mapping for common HTTP status codes
  • Opt-in helper for file-based logging during local development

Installation

Install from PyPI (or your preferred index):

pip install OireachtasAPIWrapper

Using uv:

uv add OireachtasAPIWrapper

Quick Start

from OireachtasAPI import API

client = API()
response = client.make_request(
    endpoint="https://api.oireachtas.ie/v1/legislation",
    params={"limit": 5},
)

print(response.json())

Enable basic file logging when you need to trace requests:

from OireachtasAPI import configure_logging

configure_logging()

Local Development

Create an isolated environment and install dev dependencies with uv:

uv sync
uv run pytest

If you prefer standard tooling, pip install -e .[test] provides the same dependencies defined in pyproject.toml.

Contributing

Issues and pull requests are welcome on GitHub. Please open an issue before submitting large changes so we can coordinate work.

License

Released under the MIT License. See LICENSE.txt for details.

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

oireachtasapiwrapper-1.0.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

oireachtasapiwrapper-1.0.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file oireachtasapiwrapper-1.0.1.tar.gz.

File metadata

File hashes

Hashes for oireachtasapiwrapper-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d4039165ec9290e37360e8290275c052aca116e4ca05591744f5b7f257abbd24
MD5 adca713293c62422b0b539daf6819d1a
BLAKE2b-256 4ad4db4060cfc85cba5c2c6eaae2de952bd307ddf453e6258d8663e3cd8f6935

See more details on using hashes here.

File details

Details for the file oireachtasapiwrapper-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for oireachtasapiwrapper-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 018d61dd45047a7f790c984a7aec28ebed3efcb44246328b7f7199d65559d564
MD5 be81c742f2afe5f07a75436f0b52349a
BLAKE2b-256 1f3b042f571402025b5c0d97771c8a2a554ca50c3a68ed7dd1080e55ea77d2ec

See more details on using hashes here.

Supported by

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