Registry / serialization / ghga-event-schemas

ghga-event-schemas

JSON →
library13.0.0pypypiunverified

A library collecting Pydantic-based event schemas used for events exchanged between GHGA services. Current version is 13.0.0, requiring Python >=3.12. Maintained actively by the GHGA community.

pip install ghga-event-schemas
INSTALL
IMPORT
SIG · GHGA-EVENT-SCHEMAS
G
ghga-event-schemas
serializationpythonv13.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

EventPublisher
from ghga_event_schemas import EventPublisher
from ghga_event_schemas import EventPublisher

Basic usage: import event and model classes, create a model instance, then wrap it in an event.

from ghga_event_schemas.events import UploadAccepted from ghga_event_schemas.models import FileUpload # Instantiate a FileUpload model file_upload = FileUpload( file_id="some-file-id", upload_id="upload-123", object_id="obj-456", bucket_id="bucket-789", file_size=1000, upload_date="2023-01-01T00:00:00Z" ) # Create an UploadAccepted event event = UploadAccepted(payload=file_upload) print(event)
Debug
Known issues
breakingIn version 10.0.0, some ID fields changed from string to UUID4 and some string fields changed to UTCDatetime. If you are upgrading from pre-10.0.0, you must update your code to use UUID objects and datetime objects accordingly.
fix
Ensure all IDs are passed as uuid.UUID objects and date strings as datetime.datetime objects (with UTC timezone).
affects: <10.0.0
deprecatedThe 'id' field in FileUpload was renamed in version 10.1.1; previously it was called 'file_id'.
fix
Use 'id' instead of 'file_id' when constructing FileUpload models.
affects: <10.1.1
gotchaThe package name uses hyphens (ghga-event-schemas) but the import module uses underscores (ghga_event_schemas). Common mistake is to use dots or hyphens in imports.
fix
Use 'import ghga_event_schemas' or 'from ghga_event_schemas import ...'
affects: all
Upgrade
Version history
13.0.0latest on PyPI · released May 4, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
ghga-event-schemas — pip install ghga-event-schemas · libregistry