opendata-calendars
Overview
Fetch exchange and bank holiday calendars from their publishers (B3, ANBIMA, FEBRABAN, NASDAQ, US federal), with cache and provenance, returned as purecalendars calendars
Documentation
The documentation site lives at https://guilhermegor.github.io/opendata-calendars/. Serve it locally with bash bin/poe_exec.sh docs_serve.
Getting Started
Python 3.11+ is the only prerequisite; bin/venv.sh installs Poetry when it is missing.
Install
git clone https://github.com/guilhermegor/opendata-calendars.git
cd opendata-calendars
bash bin/venv.sh
bash bin/poe_exec.sh init
poe lives inside the virtualenv, so bin/venv.sh creates it first; bin/poe_exec.sh then
runs poe init without activating anything.
Usage
pip install opendata-calendars
from datetime import date
from opendata_calendars.br import DatesBRB3Web
cls_calendar = DatesBRB3Web()
print(cls_calendar.holidays()[:3])
print(cls_calendar.is_working_day(date(2026, 12, 24)))
Each *Web class fetches its publisher's page, caches it on disk under opendata_calendars_cache,
and exposes the business-day arithmetic of purecalendars. Brazilian providers live in
opendata_calendars.br (B3, ANBIMA, FEBRABAN), US providers in opendata_calendars.us (Nasdaq,
federal holidays). The federal-holidays scrape needs a browser: install the web extra and run
playwright install chromium once. The classes build on the public calendar base of
purecalendars (4.1.0 and later), so the dependency is pinned below the next major.
Project Structure
opendata-calendars/
├── .github/ workflows, CODEOWNERS, PR template
├── .specs/ feature specs and backlog trackers
├── bin/ gate scripts and helpers
├── docs/ published documentation
├── src/ the opendata_calendars package
├── tests/
│ ├── unit/
│ └── integration/
├── pyproject.toml
└── poe_tasks.toml task runner entry points
Development
After the bootstrap under Install, any task can be run with the bootstrap script:
bash bin/poe_exec.sh <task>, and bash bin/poe_exec.sh with no task lists them.
bash bin/poe_exec.sh unit_tests
bash bin/poe_exec.sh integration_tests
Once the first release's docs deploy has created the gh-pages branch, run
bash bin/poe_exec.sh enable_pages once: until that branch exists, init leaves Pages untouched.
Public API
The public surface is the __all__ of opendata_calendars, opendata_calendars.br and
opendata_calendars.us; everything under _internal/ is private. The top-level __all__ is
["__version__"]; the providers are DatesBRAnbimaWeb, DatesBRB3Web and DatesBRFebrabanWeb
in br, and DatesUSFederalHolidaysWeb and DatesUSNasdaq in us.
API guarantee (1.x)
From 1.0.0, the names in the __all__ of opendata_calendars, opendata_calendars.br and
opendata_calendars.us follow semantic versioning: removing or
renaming one, or changing its signature or behaviour incompatibly, happens only in a new
major version. New names and backwards-compatible changes arrive in minor and patch releases.
Everything under opendata_calendars._internal, and any name not in __all__, is private and
may change in any release. The package ships py.typed, so its annotations are part of the
typed API.
Publishing
Releases go out from the release workflows under .github/workflows/; the git tag is the
version.
The path from 0.x to 1.0.0, and the release gate that guards it, is in docs/releasing-1-0-0.md.
Contributing
See CONTRIBUTING.md for the branch, commit and review rules.
License
This project is licensed under MIT; see LICENSE.
Authors
Useful Links
Generated from the lib-minimal template via BlueprintX.
Metadata
Release files for opendata-calendars 1.0.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 | Provenance | Actions |
|---|---|---|---|---|
| opendata_calendars-1.0.0.tar.gz | 87.1 kB | With provenance | Details for opendata_calendars-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| opendata_calendars-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for opendata_calendars-1.0.0-py3-none-any.whl |
Total release size: 203.9 kB
Release files / opendata_calendars-1.0.0.tar.gz
| Download URL | opendata_calendars-1.0.0.tar.gz |
|---|---|
| Size | 87.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b9193227dfb60de7d0066ab23b29252d866c77903455067c0cbcff701020f534
|
|
BLAKE2b-256 checksum How to use checksums |
a9b1407f4d74de968289986d5f522b944a16d0292c68ddf96107fe81ba820c19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Nov 23, 2026.
Transparency logRelease files / opendata_calendars-1.0.0-py3-none-any.whl
| Download URL | opendata_calendars-1.0.0-py3-none-any.whl |
|---|---|
| Size | 116.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bbcdcadfb78ad7c1a0c1f4fc2b0523887dae39612caf3d06c96d45cc5ba34bdf
|
|
BLAKE2b-256 checksum How to use checksums |
4282d1c264051a87ba2da77ce43bf13bace383817310f2947953f0081cdba910
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Nov 23, 2026.
Transparency logSecurity for opendata-calendars 1.0.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for opendata_calendars-1.0.0.tar.gz
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 Nov 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.