Skip to main content

A Python library for fetching structured information from BOPA (Boletín Oficial de la Principidad de Asturias).

Project description

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.

[!WARNING] BOPA bulletins are available in the portal from 01/01/2000 onwards. Requests for earlier dates will return no data.

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

Citation

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

bopa_fetcher-0.1.2.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

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

bopa_fetcher-0.1.2-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file bopa_fetcher-0.1.2.tar.gz.

File metadata

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

File hashes

Hashes for bopa_fetcher-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b6fa391e19c0c3efc365b0eab91019a311a7c4f113e872581d3eb3b949db9688
MD5 c40bee8be985d4ae2664434b5aa0a3bb
BLAKE2b-256 16ce52433cd80a13252dce6fa97ea92754c4eb14a6f1e4e8ab98e5e5e2465be3

See more details on using hashes here.

Provenance

The following attestation bundles were made for bopa_fetcher-0.1.2.tar.gz:

Publisher: publish.yml on diegoglezsu/bopa-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 bopa_fetcher-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: bopa_fetcher-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bopa_fetcher-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4a4f9b6be6070cf9dde403f1128726ea26ff8c64535a132bc2e74460ea8a3075
MD5 2f96900524e03317bf32eedca5f743c5
BLAKE2b-256 526886f40a9858b43f12cec2410eb2586e76029059453b4546595a41f57176fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for bopa_fetcher-0.1.2-py3-none-any.whl:

Publisher: publish.yml on diegoglezsu/bopa-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