Skip to main content
Change of provenance

The repository or configuration that created this release differ from a previous release. View details.

airac-tools

PyPI - Version PyPI - License

airac-tools is a Python package for working with ICAO AIRAC (Aeronautical Information Regulation And Control) cycles.
It provides a variety of utilities to determine cycle dates, validate cycle strings, perform conversions, iterate over cycles, and more.


Features

  • Cycle Information Functions

    • get_current_cycle(date: datetime = None) -> str: Get the current AIRAC cycle for a given date.
    • get_next_cycle(date: datetime = None) -> str: Get the next AIRAC cycle after a given date.
    • get_previous_cycle(date: datetime = None) -> str: Get the previous AIRAC cycle.
    • get_cycle_start_date(cycle: str) -> datetime: Get the start date of a given AIRAC cycle.
    • get_cycle_end_date(cycle: str) -> datetime: Get the end date of a given AIRAC cycle.
  • Date Conversion Functions

    • date_to_cycle(date: datetime) -> str: Convert any date to its corresponding AIRAC cycle.
    • cycle_to_date(cycle: str) -> datetime: Convert an AIRAC cycle to its start date.
  • Validation Functions

    • is_valid_cycle(cycle: str) -> bool: Check if a given cycle string (like '2309') is valid.
    • is_date_in_cycle(date: datetime, cycle: str) -> bool: Check if a date falls within a specific cycle.
  • Listing/Iteration Functions

    • list_cycles(year: int) -> list[str]: List all AIRAC cycles for a given year.
    • cycles_between(start_cycle: str, end_cycle: str) -> list[str]: List all cycles between two cycles.
    • dates_between(start_cycle: str, end_cycle: str) -> list[datetime]: List start dates for each cycle in a range.
  • Utility Functions

    • cycle_offset(cycle: str, offset: int) -> str: Returns the cycle offset by N cycles.
    • format_cycle(cycle: str) -> str: Returns a human-readable cycle string.

Installation

Install from PyPI (when published):

pip install airac-tools

Or install locally (for development):

git clone https://github.com/jj-sm/airac-tools.git
cd airac-tools
pip install .

Usage

from airac_tools import cycle

# Get current AIRAC cycle
current_cycle = cycle.get_current_cycle()
print(cycle)  # e.g., '2308'

# List all cycles in 2025
cycles_2025 = cycle.list_cycles(2025)
print(cycles_2025)  # ['2501', ..., '2513']

# Convert date to cycle
from datetime import datetime, timezone
cycle_2 = cycle.date_to_cycle(datetime(2024, 8, 10, tzinfo=timezone.utc))
print(cycle)  # e.g., '2408'

# Get cycle start/end dates
start = cycle.get_cycle_start_date('2408')
end = cycle.get_cycle_end_date('2408')
print(start, end)

# Check if date is within a cycle
cycle.is_date_in_cycle(datetime(2024, 8, 10, tzinfo=timezone.utc), '2408')  # True

# Cycle offset
cycle.cycle_offset('2408', 2)  # '2410'

# Format cycle
from airac_tools import utils
print(utils.format_cycle('2408'))  # 'AIRAC 24/08'

Development

  • Clone the repository and install in editable mode:
    pip install -e .
    
  • Run tests with:
    pytest
    
  • Code is formatted with PEP8.
  • Contributions and issues are welcome!

License

MIT License.


Acknowledgements

AIRAC cycle rules are based on ICAO documentation and public sources.

Metadata

Release files for airac-tools 1.0.11

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

Change of provenance

The repository or configuration that created these release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Source distribution (sdist)

Source distribution for airac-tools 1.0.11
File Size Uploaded Provenance Actions
airac_tools-1.0.11.tar.gz 7.5 kB With provenance Details for airac_tools-1.0.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for airac-tools 1.0.11
File Interpreter ABI Platform Actions
airac_tools-1.0.11-py3-none-any.whl Python 3 none any Details for airac_tools-1.0.11-py3-none-any.whl

Total release size: 13.9 kB

Release files / airac_tools-1.0.11.tar.gz

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL airac_tools-1.0.11.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
733c90b79b2a433d35f6dfcf81879740c98de16c8381f06c8b8a4463e4202f17
BLAKE2b-256 checksum
How to use checksums
d635afd42f7ca7efd1e406613a164792972ad524c66059d77103458f9c23a460
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Sep 19, 2025.

Transparency log

Release files / airac_tools-1.0.11-py3-none-any.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL airac_tools-1.0.11-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f6158282c75eb4137eaa4dd724b81e7ff889246eee2dfc119de75a242fb0537
BLAKE2b-256 checksum
How to use checksums
1bb2d4c484a353a63433e9b9b7a60d47a4a25c21224ff9be617ad2309b16d221
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Sep 19, 2025.

Transparency log

Security for airac-tools 1.0.11

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.

Change of provenance

The repository and configuration that created this release differ from a previous release.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Repository

Select from 2 files

Attestation for airac_tools-1.0.11.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 Sep 19, 2025.

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.

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