Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-39646: Add FastAPI app integration through dependencies #25

Merged
merged 11 commits into from
Jul 18, 2023

Conversation

jonathansick
Copy link
Member

  • Integration into FastAPI apps through dependencies in kafkit.fastapi.dependencies:

    • AioKafkaProducerDependency provides a Kafka producer based on aiokafka's AIOKafkaProducer (requires the aiokafka extra).
    • PydanticSchemaManager providers a Pydantic-based schema manager for Avro schemas, kafkit.schema.manager.PydanticSchemaManager.
    • RegistryApiDependency provides an HTTPX-based Schema Registry client, kafkit.registry.httpx.RegistryApi.

This provides a RegistryApi client as a dependency that can be used by
FastAPI path operation handlers. This is ported from our Squarebot app.
This FastAPI dependency makes a PydanticSchemaManager available to
FastAPI route handlers. It was originally developed for Squarebot.
This provides a FastAPI dependency that provides an AIOKafkaProducer to
FastAPI path operations.
It might be useful to add this at some point, but for now we'll ignore
it.
This allows us to use the native union syntax for type annotations.
This will keep the pre-commit hooks up-to-date. Dependabot will continue
to monitor the Python pins.
@jonathansick jonathansick merged commit 6cce87f into main Jul 18, 2023
6 checks passed
@jonathansick jonathansick deleted the tickets/DM-39646 branch July 18, 2023 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant