brubru
The official Python client for the Brubru EU Data API: the whole EU institutional data estate behind one key. Legislation, procedures, institutions, the social directory and the input-first extract engine, all on the same five-datapoint contract.
Install
pip install brubru
Only dependency: requests.
Quickstart
import brubru
bru = brubru.Client(api_key="brubru_live_...")
# Extract structured items from any EU institutional URL (optionally EuroVoc-tagged)
res = bru.extract("https://cinea.ec.europa.eu/news-events/news_en", classify=True)
for item in res:
print(item.document_date, item.title, item.public_url)
# The social directory: recent posts from a mapped entity
page = bru.social.posts(entity_type="commissioner", platform="x", limit=20)
for post in page:
print(post.entity_name, post.public_url)
# Stream across all pages, capped
for post in bru.social.iter_posts(entity_type="mep", max_items=200):
...
Authentication
Your key is sent as the X-API-Key header. Get one on the Professional subscription (hello@beresol.eu).
Base URL
The client defaults to the API host (brubru-production.up.railway.app). The brand domain brubru.beresol.eu serves the website and the static docs, not the API, so do not point the client there. Override base_url= once a dedicated API domain is in place.
Errors
Every non-2xx response raises a typed exception, all subclasses of brubru.BrubruError:
| Status | Exception |
|---|---|
| 401 | AuthError |
| 402 | PaymentRequiredError |
| 403 | ScopeError |
| 404 | NotFoundError |
| 422 | ValidationError |
| 429 | RateLimitError |
| 5xx | ServerError |
Each carries .status and .payload.
The five datapoints
Every list/detail item exposes public_url, body_txt, body_html, document_date, creation_date (plus title/summary). On list calls body_txt/body_html are None; fetch the detail (bru.social.post(id)) for the full body. The original JSON is always on item.raw.
EuroVoc
To turn the eurovoc_descriptors an extract item carries into typed, domain-enriched objects, use the companion eurovoc package: eurovoc.from_descriptors(item.eurovoc_descriptors).
Tests
pip install -e '.[test]'
pytest -m "not live" # offline, no network
BRUBRU_API_KEY=brubru_live_... pytest -m live # hits production read-only
MIT licensed. Built by Beresol BV.
Metadata
Release files for brubru 0.1.0
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 | |
|---|---|---|---|---|
| brubru-0.1.0.tar.gz | 12.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| brubru-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.2 kB
Release files / brubru-0.1.0.tar.gz
| Download URL | brubru-0.1.0.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3878bed8366f2d4253558a3cfa4839d95517161cc3159a85a0cf92de82f4903d
|
|
BLAKE2b-256 checksum How to use checksums |
733164dda6802ffd0e5d34cadf6bc135028f9fc7ff88673cfc32fa0f2414095d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 29, 2026.
Transparency logRelease files / brubru-0.1.0-py3-none-any.whl
| Download URL | brubru-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a6c622861d77031a541b4817500ff6a6c71aaf363edeca9c078fa1cd5034d3e3
|
|
BLAKE2b-256 checksum How to use checksums |
0b2c8b29ab9064bf318704b1ecc593fb8f2db0c965957f4b86ee6a652f450bf1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 29, 2026.
Transparency logSecurity for brubru 0.1.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for brubru-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 29, 2026.
Transparency logA 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.