Skip to main content

bopa-fetcher

Tests CodeQL Quality Gate Status Codecov status PyPI version Documentation DOI

Description

bopa-fetcher Logo

bopa-fetcher is a Python library for programmatic access to the official bulletins of the Principality of Asturias (BOPA). It allows users to search, retrieve, and analyze bulletin summaries and individual articles in a structured manner.

Why bopa-fetcher?

BOPA (Boletín Oficial del Principado de Asturias) is the official gazette of the region of Asturias, Spain. Researchers, legal professionals, and journalists often need to search, download, and analyze large volumes of legislative and administrative documents. bopa-fetcher provides a simple, programmatic interface to:

  • Retrieve bulletin summaries and articles as structured Python objects.
  • Search across date ranges for both bulletins and individual articles.
  • Export data to dictionaries for integration with data analysis pipelines (pandas, NumPy, etc.).
  • Avoid manual scraping by handling HTML parsing and URL construction internally.

Main features

  • Legal research: Download and analyze official bulletins for a specific time period to track legislative changes.
  • Data journalism: Collect structured data from BOPA for investigative reporting on regional governance.
  • Policy analysis: Extract and categorize dispositions by origin (council, council board, presidency, etc.) for quantitative studies.
  • Archive building: Build reproducible datasets of Asturian official publications for academic research.

Quick Start

Installation

Install from PyPI:

pip install bopa-fetcher

Basic Usage Example

Fetch acts for a publication date:

from bopa.api import Client
client = Client()

# Get the bulletin summary for 29/12/2023
bulletin = client.get_bulletin(date="29/12/2023")
print(bulletin.to_dict())

# get specific article by code
article = client.get_article(cod="2023-11737", date="29/12/2023")
print(f"  article: {article.to_dict()}")

Use Case Examples

The repository includes runnable scripts with examples and use cases of the library. These scripts can be found in the scripts/ directory.

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 corresponding author:

Acknowledgements

The authors gratefully acknowledge the financial support of the Asturian Agency for Science, Business Competitiveness and Innovation (SEKUENS) under Grant Agreement No. SEK-25-GRU-GIC-24-018. Noelia Rico and Irene Díaz also acknowledge support from the European project SCIMIN-CRM (Grant Agreement No. 101177746) and the funding from the Spanish Ministry of Science and Innovation through project PID2022-139886NB-I00.

Citation

If you use bopa-fetcher in your research, please cite it. Citation information is available in the CITATION.cff file.

Metadata

Release files for bopa-fetcher 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bopa-fetcher 0.1.5
File Size Uploaded
bopa_fetcher-0.1.5.tar.gz 16.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bopa-fetcher 0.1.5
File Interpreter ABI Platform
bopa_fetcher-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 29.1 kB

Release files / bopa_fetcher-0.1.5.tar.gz

Download URL bopa_fetcher-0.1.5.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f77596a2ed38e600c2a2d410b613de419e11b9242686654a55232e6a47e6b5d9
BLAKE2b-256 checksum
How to use checksums
e82bf6bfa9190461dab01895733bfb11c87e961d36f3f69b77824557cfbdc309
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 26, 2026.

Transparency log

Release files / bopa_fetcher-0.1.5-py3-none-any.whl

Download URL bopa_fetcher-0.1.5-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48b5393dc7fc2c3a29d0f1137098e6d45e7acba1f1d744dd27027443eea494c5
BLAKE2b-256 checksum
How to use checksums
e15b7a73dba993cd31d1a98bcc32f61c8c568bf8a9767066dfc77bbca3549ca4
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 26, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.8

2 release files

0.1.6

2 release files

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page