Metadata-Version: 2.4
Name: OireachtasAPIWrapper
Version: 0.0.2
Summary: Python wrapper client for the Oireachtas public API
Home-page: https://github.com/aaronbowman/OireachtasAPIWrapper
Author: Aaron Bowman
Author-email: Aaron Bowman <aaronrbowman12@gmail.com>
License: MIT License
        
        Copyright (c) 2024 Aaron Bowman
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/aaronbowman/OireachtasAPIWrapper
Project-URL: Repository, https://github.com/aaronbowman/OireachtasAPIWrapper
Project-URL: Documentation, https://github.com/aaronbowman/OireachtasAPIWrapper#readme
Project-URL: Issues, https://github.com/aaronbowman/OireachtasAPIWrapper/issues
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: requests>=2.31
Provides-Extra: test
Requires-Dist: pytest>=8.4; extra == "test"
Requires-Dist: httpx>=0.27; extra == "test"
Provides-Extra: build
Requires-Dist: build>=1.2.1; extra == "build"
Dynamic: author
Dynamic: home-page
Dynamic: license-file

# Oireachtas API Wrapper

Python client maintained by **Aaron Bowman** for the public [Oireachtas API](https://api.oireachtas.ie/). 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):

```bash
pip install OireachtasAPIWrapper
```

Using uv:

```bash
uv add OireachtasAPIWrapper
```

## Quick Start

```python
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:

```python
from OireachtasAPI import configure_logging

configure_logging()
```

## Local Development

Create an isolated environment and install dev dependencies with uv:

```bash
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](https://github.com/aaronbowman/OireachtasAPIWrapper). Please open an issue before submitting large changes so we can coordinate work.

## License

Released under the MIT License. See [`LICENSE.txt`](LICENSE.txt) for details.
