Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

OpenItinerary

build PyPI Version

OpenItinerary is an open, vendor-neutral standard for representing travel itineraries as structured data.

Inspired by JSON in the data exchange space, OpenItinerary facilitates a common specification that any travel company can produce or consume without relying on proprietary formats. A single itinerary can contain flights, trains, accommodation and other travel related activities from various vendors within a single unified model.

Principles:

  • Vendor Neutral: No dependency on any particular vendor proprietary format. Instead model the underlying travel concepts.
  • Open & Interoperable: Designed to move cleanly between systems and programming languages.
  • Strongly Typed: Fields have clear semantics and avoid ambiguity. Missing concept and fields should be proposed to be added to the standard and there should be no custom metadata "escape hatches".
  • Minimal: Universal Concepts are defined at the base models and domain specifics belong in specialized types.
  • Serialization Friendly: Data model will at minimum map cleanly to JSON.
  • Versioning: Schema is versioned and follows standard semantic versioning rules.
  • Single Canonical Time: Date/Times are always stored in UTC format. Geographic Places will always store the Time zone in which they take place. Downstream applications are responsible for ensuring that time presented correctly.
  • Internationalization: International differences are handled explicitly. Textual fields will store the language they are stored in so that downstream applications can present/provide translation when needed.

Implementation

The schema is defined and maintained using Pydantic Models however this does not mean that OpenItinerary is a python project. These models are used to generate a JSON Schema which serves as the canonical schema of the project.

JSON is the default interchange format because it is universal, readable, and easy to integrate. From this format, other formats can be derived:

graph LR

Pydantic(Pydantic Models)
JSONSchema(JSON Schema)

Pydantic --> JSONSchema

JSONSchema --> Typescript
JSONSchema --> Protobuf
JSONSchema --> Flatbuffer
JSONSchema --> ...

Performance sensitive consumers may want to use binary formats such as Protobuf so the standard only states that JSON is a minimum supported format. Binary formats must represent the same model.

Python Package

Install the Python package from PyPI:

python -m pip install openitinerary

Import models from the openitinerary package:

from openitinerary.models.itinerary import Itinerary

Generate the current JSON Schema with the installed command:

openitinerary --output stdout

Adapter API configuration

The Adapter API limits each uploaded document to 10 MiB by default. Set to a positive integer to configure the limit in bytes. The value is loaded when the API process starts, so restart the process after changing it.

Environment Variables

Name Description Default
OPEN_ITINERARY_MAX_UPLOAD_SIZE_BYTES Maximum size of an uploaded document to the /adapt API 10485760 bytes (10MB)

## Concepts

  • Itinerary: An itinerary is an ordered collection of typed segments.
  • Segment: A travel activity that happens at a specified time at a specific place.
  • Place: A geographical location on the earth.

The BaseSegment defined common concepts for all travel related activities and domain specific models such as FlightSegment add stronger fields and validation.

Roadmap

Schema

  • Base Segment Types
  • Flights and Airports
  • Train and Train Stations
  • Accommodation
  • Transfers
  • Activities and Tours
  • Car Rentals
  • Ferries
  • Cruises

Implementations

Telemetry

This project uses OpenTelemetry for logging, metrics and traces. See the Standard environment variables to configure the collector.

Versioning and releases

This repository has two independent versions:

  • The schema version is defined by OPEN_ITINERARY_VERSION in src/openitinerary/version.py. Changes to the standard must update this version in the same pull request and regenerate the committed schemas with make generate_out.
  • The Python package version is defined in pyproject.toml. It changes when a new Python distribution is published, including releases containing only Python tooling or adapter changes. Such changes do not require a schema version bump.

Schema versions follow semantic versioning. Breaking changes increment the major version, backwards-compatible additions increment the minor version, and small corrections to schema documentation or metadata increment the patch version. Generated schema directories intentionally use only the major and minor components, for example schemas/0.1/itinerary.schema.json. A patch release updates the schema for that minor line rather than creating a new directory.

Package version changes are made by a developer in a pull request intended to create a release. Use uv version so pyproject.toml and uv.lock remain in sync, then commit both files:

uv version --bump patch --no-sync

Use minor or major instead of patch when appropriate. Pull requests are published as beta versions for testing. After a package-version change is merged to main, the committed version is built and published to PyPI. A merge that does not change the package version does not publish a stable release.

License

Copyright 2026 Kiran Patel.

Licensed under the Apache License, Version 2.0.

Metadata

Release files for openitinerary 0.1.7b94

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

Source distribution (sdist)

Source distribution for openitinerary 0.1.7b94
File Size Uploaded Provenance
openitinerary-0.1.7b94.tar.gz 28.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for openitinerary 0.1.7b94
File Interpreter ABI Platform
openitinerary-0.1.7b94-py3-none-any.whl Python 3 none any Details

Total release size: 74.4 kB

Release files / openitinerary-0.1.7b94.tar.gz

Download URL openitinerary-0.1.7b94.tar.gz
Size 28.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ba4964dba845d0b4441b841a9f2e52cdae879a1ab52e5bb0fc61ca230c375092
BLAKE2b-256 checksum
How to use checksums
7efe72986814dc17b0d8ac5aa6bc295076af31c68520e0346c78e38f50a883e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / openitinerary-0.1.7b94-py3-none-any.whl

Download URL openitinerary-0.1.7b94-py3-none-any.whl
Size 45.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c6c95f475aa8763b3874f0daf15dc529e46dd7e0376685b330b20107bb61e40a
BLAKE2b-256 checksum
How to use checksums
64faf4230e15e92c45f9d2b1c0a4fc61283907fc3afd3af5aed963a38f7bd79e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for openitinerary 0.1.7b94

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.

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