-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
Bring first-class async I/O to glom, letting specs call await-able
functions without boilerplate.
Motivation
Today you must either:
- Block spec computations.
- Pre-fetch async data elsewhere, scattering transformation logic.
Native async support keeps your spec declarative & non-blocking.
Example
from glom import Async, aglom # new helpers
# Async operation..
async def get_entity_name(eid):
...
target = {"entity": {"id": "123"}}
SPEC = {
"id": "entity.id",
"name": Async(("entity.id", get_entity_name)),
}
result = await aglom(target, SPEC)
# -> {'id': '123', 'name': 'Acme Corp'}Perhaps the Async glomit class wrapper might not be needed, just an idea.
Metadata
Metadata
Assignees
Labels
No labels