Year calendar creation in Python
Project description
pyearcal
Generate your year calendar in Python. The result is a PDF file with 12 pages containing an image and a grid of days.
Installation
We recommend using uv tool to use and/or install pyearcal as a tool.
uv tool install pyearcal
or you can use it without installation (via uvx)
Usage
- Prepare a directory with 12 images (different image providers are planned)
- Initialize calendar with all options.
- Language (locales for English, Czech, Slovak, Italian)
- Special days (national holidays are included + add your own)
- Fonts, colours
- Render it to PDF
Usage of the script
Usage: uvx pyearcal [OPTIONS] [OUTPUT]
Options:
-s, --source PATH
-l, --locale [en|cs|it|sk]
-y, --year INTEGER
-f, --font TEXT
-d, --special-days TEXT
Example code
# Import important modules
from pyearcal import YearCalendar
from pyearcal.image_sources import UnsortedImageDirectory
from datetime import date
from pyearcal.l10n import CzechLocale
year = date.today().year + 1
# Use all pictures from "images" directory
image_source = UnsortedImageDirectory("images")
# Use Czech locale and holidays
locale = CzechLocale()
# Set a few special days
special_days = [
date(year, 1, 31) # Guido van Rossum's birthday
]
calendar = YearCalendar(year, image_source, locale, special_days)
calendar.render("calendar.pdf")
You can take FlickrDownloader as an inspiration for developing a more sophisticated image source.
Example with real pictures
Project details
Release history Release notifications | RSS feed
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 pyearcal-2025.12.0.tar.gz.
File metadata
- Download URL: pyearcal-2025.12.0.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2922b355c2da24e6957e95d81900403ab7d1323a473e39042b5b17f12659db7
|
|
| MD5 |
3fc96b4b39c597949873408b7c7a34cc
|
|
| BLAKE2b-256 |
fce6c41dd9e36a51cee0e58ad340643ab070d2b270aabb8750f0a7a90e18dbc7
|
File details
Details for the file pyearcal-2025.12.0-py3-none-any.whl.
File metadata
- Download URL: pyearcal-2025.12.0-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1532aed0ff99c385ca56dce331f32c1fcbc342cf126acf9a64879e6e941f28e9
|
|
| MD5 |
91703c83a835bc943dbf5cb76b6d19ed
|
|
| BLAKE2b-256 |
57045fc858a542594b7dbec1373296a9fecf106e6febda84f2059ec316a189c1
|