A Python library for fetching structured information from BOPA (Boletín Oficial de la Principidad de Asturias).
Project description
bopa-fetcher
Description
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:
- Author: Diego González Suárez, Noelia Rico Pachón
- Email: gonzalezsdiego@uniovi.es, noeliarico@uniovi.es
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bopa_fetcher-0.1.4.tar.gz.
File metadata
- Download URL: bopa_fetcher-0.1.4.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40979ce5249477e8e38332e709ed621c50e2b21123140a2f44fe0db3a2bd8a5c
|
|
| MD5 |
74f753d6787e3845f05fcb51eb58ca2b
|
|
| BLAKE2b-256 |
ea261c7ec76b85665f99279749ad1a9342818d451857d3477072d28ff0b56fae
|
Provenance
The following attestation bundles were made for bopa_fetcher-0.1.4.tar.gz:
Publisher:
publish.yml on diegoglezsu/bopa-fetcher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bopa_fetcher-0.1.4.tar.gz -
Subject digest:
40979ce5249477e8e38332e709ed621c50e2b21123140a2f44fe0db3a2bd8a5c - Sigstore transparency entry: 1935436569
- Sigstore integration time:
-
Permalink:
diegoglezsu/bopa-fetcher@9dacd8eedb53edc9740b137b596faa3c15fe1673 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/diegoglezsu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9dacd8eedb53edc9740b137b596faa3c15fe1673 -
Trigger Event:
release
-
Statement type:
File details
Details for the file bopa_fetcher-0.1.4-py3-none-any.whl.
File metadata
- Download URL: bopa_fetcher-0.1.4-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f5d0eda745a600f8eb57e1f66075aa728992e5d15b99d69fa76335dcf961fff
|
|
| MD5 |
b8fe0628c1c4f1b7cdbf5da655669510
|
|
| BLAKE2b-256 |
e59327380e2132954c02f3b91cc8e739c178a98abd95e718ba7b1a628fa083ef
|
Provenance
The following attestation bundles were made for bopa_fetcher-0.1.4-py3-none-any.whl:
Publisher:
publish.yml on diegoglezsu/bopa-fetcher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bopa_fetcher-0.1.4-py3-none-any.whl -
Subject digest:
0f5d0eda745a600f8eb57e1f66075aa728992e5d15b99d69fa76335dcf961fff - Sigstore transparency entry: 1935436592
- Sigstore integration time:
-
Permalink:
diegoglezsu/bopa-fetcher@9dacd8eedb53edc9740b137b596faa3c15fe1673 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/diegoglezsu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9dacd8eedb53edc9740b137b596faa3c15fe1673 -
Trigger Event:
release
-
Statement type: