📰 Vestige
A Python library for fetching and parsing issues of the Bulgarian State Gazette (Държавен вестник).
Vestige gives you a clean, dependency-light Python interface to the official Държавен вестник listing. Scrape issue metadata and download links without wrestling with raw HTML or cryptic JSF form fields ever again.
✨ Features
- 📄 Issue Listings: Fetch paginated lists of State Gazette issues, including issue number, date, year, and type.
- 📥 Download Links: Automatically resolve the PDF and RTF download URLs for each issue.
- 🔌 Pluggable Architecture: Swap out the HTTP transport or the HTML parser via simple interfaces — great for testing with mocks.
- 🗂️ Typed Models: Clean dataclasses (
IssueEntry,DownloadFile,PageResult) withto_dict()helpers for easy JSON serialization. - ⚡ Minimal Dependencies: Only needs
selectolaxandhttpx[http2].
📥 Installation
pip install vestige-scraper
Or, to install directly from source:
pip install .
🚀 Quick Start
import asyncio
from vestige import DVClient
async def main():
client = DVClient()
try:
# Fetch the first page of issues (with download URLs resolved)
page = await client.get_page(1)
print(page)
# PageResult(page=1, total_results=..., total_pages=..., entries=...)
for entry in page.entries:
print(entry)
for file in entry.download_urls:
print(f" → {file.filename}: {file.url}")
finally:
await client.aclose()
asyncio.run(main())
Fetch all pages at once
import asyncio
from vestige import DVClient
async def main():
client = DVClient()
try:
all_pages = await client.get_all_pages(max_pages=5)
for page in all_pages:
for entry in page.entries:
print(entry.to_dict())
finally:
await client.aclose()
asyncio.run(main())
Skip download URL resolution (faster)
page = client.get_page(1, fetch_downloads=False)
🗂️ Models
| Class | Description |
|---|---|
IssueEntry |
One issue of the State Gazette — number, date, year, type, and download files. |
DownloadFile |
A single downloadable file (url, filename). |
PageResult |
One page of results — holds metadata and a list of IssueEntry objects. |
⚙️ Advanced Usage
Custom transport / parser (e.g. for testing)
from vestige import DVClient
from vestige.network.transport import AsyncRequestsTransport
from vestige.scraping.parsers import IssueParser
client = DVClient(
transport=MyCustomTransport(),
parser=MyCustomParser(),
)
Both transport and parser accept any object that satisfies the AsyncPageFetcher and PageParser interfaces defined in vestige.core.interfaces.
🐍 Requirements
- Python 3.10+
asyncio>=4.0.0selectolax>=0.4.7httpx[http2]>=0.28.1
🤝 Contributing
Issues and pull requests are welcome! Please file an issue if you encounter any problems or have suggestions for improvements.
Built with ❤️ for Bulgaria's open data. MIT Licensed.
Metadata
Release files for vestige-scraper 1.2.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 | |
|---|---|---|---|
| vestige_scraper-1.2.0.tar.gz | 13.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vestige_scraper-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.7 kB
Release files / vestige_scraper-1.2.0.tar.gz
| Download URL | vestige_scraper-1.2.0.tar.gz |
|---|---|
| Size | 13.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
674a47dd7de9abdfe1998360549918e48aca52d68204305acbb0c887a54bd70f
|
|
BLAKE2b-256 checksum How to use checksums |
a406ebf72233b915bab4f81f5eed5b3d67f6a0dca0298b50771b48d109b846bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 20, 2026.
Transparency logRelease files / vestige_scraper-1.2.0-py3-none-any.whl
| Download URL | vestige_scraper-1.2.0-py3-none-any.whl |
|---|---|
| Size | 14.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9de9b9467243f6955b3eded02c7128888dba7c88846ca6290caf16e83dddf63a
|
|
BLAKE2b-256 checksum How to use checksums |
5c07ebdfab3df0b0440892c7fd1fb3f667dfb812820a5b049463f6f1e3d1dd0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 20, 2026.
Transparency log