Skip to main content

🇱🇰 sri-lanka-holidays (Python / PyPI)

Official Sri Lanka Public, Bank, and Mercantile Holidays (including Full Moon Poya Days) for Python 3.9+ (Django, FastAPI, Flask, Data Science).

Installation

pip install sri-lanka-holidays

Quick Start

from datetime import date
from sri_lanka_holidays import (
    HolidayType,
    get_holidays,
    get_mercantile_holidays,
    get_poya_days,
    get_holiday_by_date,
    is_public_holiday,
    is_mercantile_holiday,
)

# 1. Get all holidays for 2026 or 2027
holidays_2026 = get_holidays(2026)
mercantile_2027 = get_mercantile_holidays(2027)

# 2. Check specific dates ('YYYY-MM-DD' or datetime.date)
print(is_public_holiday("2026-04-03"))          # True (Good Friday)
print(is_mercantile_holiday("2026-04-03"))      # False
print(is_mercantile_holiday(date(2026, 4, 14))) # True (Sinhala & Tamil New Year)

# 3. Inspect a holiday object
holiday = get_holiday_by_date("2026-04-14")
print(holiday.name, holiday.types)

License

MIT © Sahan Ranasingha — Buy Me a Coffee

Metadata

Release files for sri-lanka-holidays 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sri-lanka-holidays 1.0.2
File Size Uploaded Provenance Actions
sri_lanka_holidays-1.0.2.tar.gz 6.8 kB With provenance Details for sri_lanka_holidays-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sri-lanka-holidays 1.0.2
File Interpreter ABI Platform Actions
sri_lanka_holidays-1.0.2-py3-none-any.whl Python 3 none any Details for sri_lanka_holidays-1.0.2-py3-none-any.whl

Total release size: 13.6 kB

Release files / sri_lanka_holidays-1.0.2.tar.gz

Download URL sri_lanka_holidays-1.0.2.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
21b56b14074728d27022297b7e85beeae8217f6659288edac45fffe79be98704
BLAKE2b-256 checksum
How to use checksums
b28b16c91e843bd76b89b28315a7e1658e0404525d434ad11346a5bd0300934b
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 9, 2026.

Transparency log

Release files / sri_lanka_holidays-1.0.2-py3-none-any.whl

Download URL sri_lanka_holidays-1.0.2-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b99e1237240a9045e6d7132e1105f84dc95d51710c30a5ce11c0bf859615e0cc
BLAKE2b-256 checksum
How to use checksums
d8b5d61cbaeea12cc552faed032c93c6cc9a9491224d12cdef950240cec93f2f
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 9, 2026.

Transparency log

Security for sri-lanka-holidays 1.0.2

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.

Select from 2 files

Attestation for sri_lanka_holidays-1.0.2.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 9, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page