Genkit AI Framework
Project description
genkit
Genkit is a framework designed to help you build AI-powered applications and features. It provides open source libraries for Python, Node.js and Go, plus developer tools for testing and debugging.
You can deploy and run Genkit libraries anywhere Python is supported. It's designed to work with many AI model providers and vector databases. While we offer integrations for Firebase and Google Cloud, you can use Genkit independently of any Google services.
Setup Instructions
pip install genkit
pip install genkit-plugin-google-genai
from pydantic import BaseModel, Field
from genkit import Genkit
from genkit.plugins.google_genai import GoogleAI
ai = Genkit(
plugins=[GoogleAI()],
model='googleai/gemini-2.0-flash',
)
class RpgCharacter(BaseModel):
"""An RPG game character."""
name: str = Field(description='name of the character')
back_story: str = Field(description='back story')
abilities: list[str] = Field(description='list of abilities (3-4)')
@ai.flow()
async def generate_character(name: str) -> RpgCharacter:
result = await ai.generate(
prompt=f'generate an RPG character named {name}',
output_schema=RpgCharacter,
)
return result.output
async def main() -> None:
"""Main function."""
character = await generate_character('Goblorb')
print(character.model_dump_json(indent=2))
if __name__ == '__main__':
ai.run_main(main())
See https://python.api.genkit.dev for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file genkit-0.5.2.tar.gz.
File metadata
- Download URL: genkit-0.5.2.tar.gz
- Upload date:
- Size: 152.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba5a75888cf6c8a02a7f77121443417d5416f113c12e1fc977aed2d2c635feea
|
|
| MD5 |
0130d08ee9da657bffe7431ada25a040
|
|
| BLAKE2b-256 |
c0c70f17aeb820738bf1cb9de15cf4464c8605fb1160a74794b3feeb94c025f6
|
Provenance
The following attestation bundles were made for genkit-0.5.2.tar.gz:
Publisher:
publish_python.yml on genkit-ai/genkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
genkit-0.5.2.tar.gz -
Subject digest:
ba5a75888cf6c8a02a7f77121443417d5416f113c12e1fc977aed2d2c635feea - Sigstore transparency entry: 1200140504
- Sigstore integration time:
-
Permalink:
genkit-ai/genkit@45f19aafbe502cb4bb8569416e6aed6533d97bc2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/genkit-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_python.yml@45f19aafbe502cb4bb8569416e6aed6533d97bc2 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file genkit-0.5.2-py3-none-any.whl.
File metadata
- Download URL: genkit-0.5.2-py3-none-any.whl
- Upload date:
- Size: 138.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02abf39be33d3ade9f5a675647ef8ab4791e82ba6470b1f6fa07d9ad7b1f9eb9
|
|
| MD5 |
b67646e56f4cc5a35fdd2a24132b5581
|
|
| BLAKE2b-256 |
c917c7bb924715dbd873cd777f08f0a569de105021bb0b4cb717617c090c6f7a
|
Provenance
The following attestation bundles were made for genkit-0.5.2-py3-none-any.whl:
Publisher:
publish_python.yml on genkit-ai/genkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
genkit-0.5.2-py3-none-any.whl -
Subject digest:
02abf39be33d3ade9f5a675647ef8ab4791e82ba6470b1f6fa07d9ad7b1f9eb9 - Sigstore transparency entry: 1189545076
- Sigstore integration time:
-
Permalink:
genkit-ai/genkit@45f19aafbe502cb4bb8569416e6aed6533d97bc2 -
Branch / Tag:
refs/tags/py/v0.5.2 - Owner: https://github.com/genkit-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_python.yml@45f19aafbe502cb4bb8569416e6aed6533d97bc2 -
Trigger Event:
push
-
Statement type: