purecalendars 
Holiday calendars and business-day arithmetic for Brazilian and US markets, computed offline.
purecalendars ships official holiday calendars for Brazil (ANBIMA, FEBRABAN, B3) and the United
States (Federal Holidays), then layers a rich set of working-day / date helpers on top —
is_working_day, add_working_days, working_days_range, delta_working_days, timezone-aware
conversions, and more. Every calendar is computed locally: no network, no cache, no browser.
Renamed from
wwdatesin 3.0.0. Useimport purecalendars. Since 3.0.1,import wwdatesstill works but emits aDeprecationWarning; that alias is removed in 4.0.0. The live fetchers (*Webclasses,DatesUSNasdaq) moved to the separateopendata-calendarspackage, which returnspurecalendarscalendars.
📖 Full documentation: https://guilhermegor.github.io/purecalendars/
✨ Key Features
🗓️ Holiday providers
One class per calendar source; all share the same date-operations surface — they differ only in which holidays they load.
| Provider | Import | Holidays |
|---|---|---|
DatesBRAnbima |
purecalendars.br.anbima |
🇧🇷 ANBIMA national holidays |
DatesBRFebraban |
purecalendars.br.febraban |
🇧🇷 FEBRABAN bank holidays |
DatesBRB3 |
purecalendars.br.b3 |
🇧🇷 National + B3 exchange non-trading days |
DatesUSFederalHolidays |
purecalendars.us.federal_holidays |
🇺🇸 US federal holidays (statutory + observed) |
⚙️ Shared calendar operations
Every provider inherits the full surface: working-day predicates (is_working_day, is_holiday,
is_weekend), business-day arithmetic (add_working_days, nearest_working_day,
get_nth_weekday_month), ranges & deltas (working_days_range, delta_working_days,
delta_working_hours), timezone/timestamp conversions, and locale-aware formatting. See the
API Reference for the complete list.
🚀 Getting Started
Prerequisites
- Python 3.10+
- Poetry (recommended)
Installation
pip install purecalendars
Or with Poetry:
poetry add purecalendars
Everything works offline after install — no network, no browser.
Quick start
from datetime import date
from purecalendars.br.b3 import DatesBRB3
cls_cal = DatesBRB3()
cls_cal.is_working_day(date(2024, 12, 25)) # False — Christmas
cls_cal.add_working_days(date(2024, 12, 24), 3) # skips holidays + weekends
cls_cal.holidays() # [(name, date), ...]
DatesBRB3 here is just an example — the same methods work on every provider; only the loaded
holiday set differs. More recipes in the
Examples guide.
📚 Documentation
- Usage — install, providers, basics
- Examples — task-oriented recipes
- API Reference — every class and method
- FAQ — common questions & troubleshooting
- Contributing — dev setup, tests, releasing
- Changelog — release history
🛠️ Development
git clone https://github.com/guilhermegor/purecalendars.git
cd purecalendars
bash bin/venv.sh # create the venv and install dependencies
bash bin/poe_exec.sh init # seed .env, install pre-commit hooks
bash bin/poe_exec.sh unit_tests # run the test suite
bash bin/poe_exec.sh install_dist_locally # build the wheel and smoke-import it
See Contributing for the full branch/PR workflow and CI gate.
👨💻 Authors
🔗 Useful Links
🤝 Contributing
Issues and PRs are welcome. Please read CONTRIBUTING.md first for dev setup,
tests, the branch/PR workflow, and the CI gate.
📜 License
This project is licensed under the MIT License — see LICENSE for details.
Metadata
Release files for purecalendars 3.1.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 |
|---|---|---|---|---|
| purecalendars-3.1.0.tar.gz | 26.7 kB | With provenance | Details for purecalendars-3.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| purecalendars-3.1.0-py3-none-any.whl | Python 3 | none | any | Details for purecalendars-3.1.0-py3-none-any.whl |
Total release size: 62.1 kB
Release files / purecalendars-3.1.0.tar.gz
| Download URL | purecalendars-3.1.0.tar.gz |
|---|---|
| Size | 26.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
050c5c25565937e70c601059780a57225baa3098b701ba377f74abb833abe83d
|
|
BLAKE2b-256 checksum How to use checksums |
54161008e2ef449f0fe9021dcc4e564f5d91bd0c3c76e57d3e87454691d802f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 20, 2026.
Transparency logRelease files / purecalendars-3.1.0-py3-none-any.whl
| Download URL | purecalendars-3.1.0-py3-none-any.whl |
|---|---|
| Size | 35.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b28a2f330e8d479944679a45b9282cf5b3a3249ca409b2c5050c438e7dda727
|
|
BLAKE2b-256 checksum How to use checksums |
f849689ca66da673f36ce6f17b4491662e7d5bb7479357730a14a694463713e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 20, 2026.
Transparency logSecurity for purecalendars 3.1.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 purecalendars-3.1.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 20, 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.