Skip to main content

Genkit Flask Plugin

Expose Genkit flows as HTTP endpoints in a Flask application.

Building with a coding agent? Install the Genkit Python skill first.

npx skills add genkit-ai/skills --skill developing-genkit-python

It teaches your agent the current Genkit Python APIs and common gotchas. Source, manual install and skills for other languages: genkit-ai/skills.

Installation

uv add genkit-flask genkit-google-genai

Usage

from flask import Flask
from genkit import Genkit
from genkit_flask import genkit_flask_handler
from genkit_google_genai import GoogleAI

app = Flask(__name__)
ai = Genkit(plugins=[GoogleAI()], model=GoogleAI.gemini('gemini-flash-latest'))


@app.post('/api/greet')
@genkit_flask_handler(ai)
@ai.flow()
async def greet_user(name: str) -> str:
    res = await ai.generate(prompt=f'Say hello to {name} in one sentence.')
    return res.text

The endpoint name defaults to the flow's name with dots replaced by underscores (e.g., greet_user). To override the endpoint name or prevent clashes with an existing view, pass endpoint= to the route decorator (e.g., @app.post('/api/greet', endpoint='custom_greet')).

Requires Flask 3.1+.

Metadata

Release files for genkit-flask 0.13.0

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

Source distribution (sdist)

Source distribution for genkit-flask 0.13.0
File Size Uploaded Provenance Actions
genkit_flask-0.13.0.tar.gz 14.0 kB With provenance Details for genkit_flask-0.13.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for genkit-flask 0.13.0
File Interpreter ABI Platform Actions
genkit_flask-0.13.0-py3-none-any.whl Python 3 none any Details for genkit_flask-0.13.0-py3-none-any.whl

Total release size: 24.8 kB

Release files / genkit_flask-0.13.0.tar.gz

Download URL genkit_flask-0.13.0.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
666f4e977033d66d89cf29536324464879eb333130351ad263c140ab3bcb08e3
BLAKE2b-256 checksum
How to use checksums
ddb26924fefedc4a12225b24fda822782579135fe71a26502adaeee2582f6e21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / genkit_flask-0.13.0-py3-none-any.whl

Download URL genkit_flask-0.13.0-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9be354ef0efe92139c2e73ef360de860e68b5c56910a0fcb738bca22794d159
BLAKE2b-256 checksum
How to use checksums
3a60289ba1a72295fc053404a5ae6ce7bb89971d498b3d93dafe02a9830e5aaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Security for genkit-flask 0.13.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for genkit_flask-0.13.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

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