This library provides Pydantic v2 models that declare the Airbyte Protocol. It defines the structured messages (like records, states, logs, and catalogs) used for inter-process communication between Airbyte sources, destinations, and the platform. It is currently at version 0.19.0 and receives frequent updates, often adding new features and protocol extensions.
pip install airbyte-protocol-models-pdv2Verified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create an `AirbyteRecordMessage`, wrap it within an `AirbyteMessage` envelope, serialize it to a JSON string, and then deserialize it back into a Pydantic object. This is fundamental for interacting with the Airbyte Protocol, where all messages are exchanged as JSON.
Ensure your entire project ecosystem is compatible with Pydantic v2. Migrate any existing Pydantic v1 models to v2, or isolate the use of this library in environments where Pydantic v1 is not present.
Update your code to use the latest protocol models, which are implicitly v0 (or the current major version of the protocol), and avoid any references to explicitly named V1 models.
If you were directly accessing or manipulating a 'schema' field on any protocol model, update your code to use 'json_schema' instead.
Always check the compatibility matrix between your Airbyte Platform version and the Airbyte Protocol version (implied by the `airbyte-protocol-models-pdv2` library version) to avoid unexpected issues. Airbyte's pre-upgrade checks are designed to help, but awareness is key.