aerokit
Object-oriented airline domain library built for the SkyBook cloud flight booking application (MSc Cloud Platform Programming project, NCI).
Install with pip install aerokit-skybook, import as aerokit.
The library holds the airline business logic that must behave identically in every part of the system - the Flask web application and the AWS Lambda ticket generator both depend on it.
What it provides
- Airports & routes - reference data with coordinates and IANA timezones; great-circle distances (haversine), block-time estimates, timezone-correct local arrival times.
- PNR - 6-character booking references from a CSPRNG, with a positional checksum character so typos and character swaps are rejected before any database lookup.
- Fares - a polymorphic pricing engine:
FareCalculatorsums abstractFareComponentsubclasses (base distance fare, fuel surcharge, taxes, baggage), so pricing rules can be added without modifying the calculator. - Seats - seat maps generated from layout strings like
"ABC DEF", with window/aisle-aware allocation and graceful fallback. - E-tickets - a builder that renders a booking into a self-contained HTML ticket (or plain text), refusing to build incomplete tickets.
Example
from aerokit import CabinClass, FareCalculator, PNRGenerator, Route, SeatMap, SeatPreference
route = Route("DUB", "CDG")
quote = FareCalculator().quote(route, CabinClass.ECONOMY, bags=1)
pnr = PNRGenerator().generate()
seat = SeatMap().allocate(occupied=["1A"], preference=SeatPreference.WINDOW)
print(route.duration_str(), quote.total, pnr, seat.label)
Tests
python -m pytest tests/
Metadata
Release files for aerokit-skybook 1.0.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 |
|---|---|---|---|---|
| aerokit_skybook-1.0.0.tar.gz | 12.4 kB | Without provenance | Details for aerokit_skybook-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aerokit_skybook-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for aerokit_skybook-1.0.0-py3-none-any.whl |
Total release size: 23.2 kB
Release files / aerokit_skybook-1.0.0.tar.gz
| Download URL | aerokit_skybook-1.0.0.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8ee9bbb351f68ebb21bba89c9dcc6c2226ac3c0a0662ac89b9d38a5f7641de78
|
|
BLAKE2b-256 checksum How to use checksums |
5169196bb8b919abd239624f116b494d1f08e78a12a5764548d4d4eeb598bee0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / aerokit_skybook-1.0.0-py3-none-any.whl
| Download URL | aerokit_skybook-1.0.0-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c4162d63e0f01024f28d77884f6aaa39a1a781dedd00c7d18d1b816dd3414c8
|
|
BLAKE2b-256 checksum How to use checksums |
aa4bcfda4c4068bc7c6d769881a3aa68894f9d41976b89f5c38d79f223e77be4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for aerokit-skybook 1.0.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.