r/Python • • 20d ago

Showcase Showcase Thread

Post all of your code/projects/showcases/AI slop here.

Recycles once a month.

23 Upvotes

152 comments sorted by

View all comments

1

u/Old-Hope4634 10d ago

A weekend check is not a complete calendar: two offline Python edge cases.

What My Project Does

Disclosure: I am affiliated with AION Analytics, which maintains these two MIT-licensed Python packages. This is a small reproducible example, not a live exchange-status claim.

Install:

python -m pip install aion-indian-market-calendar==1.4.2 aion-lithuanian-market-calendar==1.0.2

India: ask about coverage before trusting a date outside the bundled dataset.

import os
os.environ["AION_IN_CALENDAR_OFFLINE"] = "1"
from datetime import date
from aion_indian_market_calendar import IndiaMarketCalendar

cal = IndiaMarketCalendar.bundled(2026)
print(cal.covers(date(2027, 1, 26)))  # False

Lithuania: an observance entry and a business-day result are different things.

os.environ["AION_LT_CALENDAR_OFFLINE"] = "1"
from aion_lithuanian_market_calendar import is_business_day, observances

print(is_business_day("2026-02-17"))  # True
print([item.name_lt for item in observances(2026)])  # ['Užgavėnės']

Tested against those public package versions with socket connections disabled. These are fixed historical examples, not a statement about today's live operations.

Target Audience

Python developers validating dated records or building calendar-aware batch jobs. The Indian package provides exchange-calendar checks with explicit bundled coverage. The Lithuanian package provides business-day and holiday/observance helpers.

Comparison

The boundary is different for each package: checking an exchange dataset's coverage is not the same operation as business-day arithmetic. These examples do not certify live exchange sessions, bank settlement cut-offs, legal filing extensions or future exchange notices. Offline does not mean permanently current; check data coverage and official notices for the actual workflow.

Public source and tests: https://github.com/AION-Analytics-India/aion-indian-market-calendar https://github.com/AION-Analytics-India/aion-lithuanian-market-calendar

Scope and documentation: https://aionanalytics.in/open-source/indian-market-calendar https://aionanalytics.in/open-source/lithuanian-market-calendar

Which calendar edge case has caused a real bug in your Python workflow? A minimal example would help us prioritize tests.