Skip to main content

A Python library for programmatic access to EU official bulletins

Project description

bulletin-fetcher

Tests CodeQL Quality Gate Status Codecov status PyPI version Documentation

Description

Bulletin Fetcher Logo

bulletin-fetcher is a Python library for programmatic access to legal acts published in official bulletins, with current support for the Official Journal of the European Union through the EUR-Lex / Cellar SPARQL endpoint.

The library provides a high-level Python API that allows developers, researchers and legal-domain experts to search EU legal acts without writing SPARQL queries directly.

Why bulletin-fetcher?

EU legal acts can be queried through public semantic web infrastructure, but using the underlying SPARQL endpoint requires knowledge of RDF vocabularies, query structure and EUR-Lex metadata conventions and ontologies.

bulletin-fetcher abstracts this complexity behind a simple Python interface. Users can retrieve legal acts by publication date, date ranges, act type, publishing institution and textual content, while receiving Python objects or CSV outputs suitable for further analysis.

Main features

  • Search EU legal acts from the Official Journal of the European Union.
  • Filter acts by date or date range, act type, publishing institution, text contained in the act title, language.
  • Retrieve available act types and publishing institutions.
  • Export act search results to CSV.
  • Work with Python instead of raw SPARQL queries.
  • Integrate easily with notebooks, data pipelines and legal analytics workflows.

Use Cases

bulletin-fetcher can be used for:

  • Legal analytics
  • Public policy research
  • Regulatory monitoring
  • Reproducible studies based on legal acts
  • Data collection pipelines

Quick Start

Installation

Install from PyPI:

pip install bulletin-fetcher

Basic Usage Example

Fetch acts for a publication date:

from bulletin.eurlex.api.client import EurlexBulletinClient

client = EurlexBulletinClient()
acts = client.get_acts( 
    date="2025-01-01",
    date_end="2025-03-31",
    title_contains="artificial intelligence",
    language="ENG"
)

print(f"Total acts: {len(acts)}")
if acts:
    first = acts[0]
    print(first.celex_uri)
    print(first.title)

Example scripts

The repository includes runnable scripts with examples of use of the library:

python scripts/run_eurlex.py

And also a Jupyter Notebook: scripts/run_eurlex.ipynb.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any questions or suggestions, feel free to reach out to the author:

Acknowledgements

TODO: Add acknowledgements here.

Citation

If you use bulletin-fetcher in academic work, please cite the project.

A CITATION.cff file will be added in a future release.


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

bulletin_fetcher-0.2.0.tar.gz (85.2 kB view details)

Uploaded Source

Built Distribution

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

bulletin_fetcher-0.2.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file bulletin_fetcher-0.2.0.tar.gz.

File metadata

  • Download URL: bulletin_fetcher-0.2.0.tar.gz
  • Upload date:
  • Size: 85.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bulletin_fetcher-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fdb3d7b60f6571f56f1b375861008e4868cbdc57c47e674d7b4fbb8b8b60f702
MD5 ebb7a84c31a2fe058541260cc535160b
BLAKE2b-256 500d6dbfec52d3453cece89fcbfbbc6c2f83dbed21df425cc41d0b813a707c09

See more details on using hashes here.

Provenance

The following attestation bundles were made for bulletin_fetcher-0.2.0.tar.gz:

Publisher: publish.yml on diegoglezsu/bulletin-fetcher

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bulletin_fetcher-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for bulletin_fetcher-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fbc96c153468a173df6c50f13c4f8b526cddbddb8bb5d00019367e562a75a39a
MD5 2ed42a59134fdad10ec1e7b8cc2db788
BLAKE2b-256 e720d4bbe5caa17b157a88f5ab84ea1f638dceeed8c2cc804b073326529b78a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for bulletin_fetcher-0.2.0-py3-none-any.whl:

Publisher: publish.yml on diegoglezsu/bulletin-fetcher

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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