Streaming utilities for CrayonAI
Project description
CrayonAI Stream
Python package for JSON Schema helpers and streaming utilities used in CrayonAI applications.
Installation
pip install crayonai_stream
Usage
JSON Schema Helpers
Convert Pydantic models to template schemas:
from crayonai_stream import pydantic_to_template_schema
from pydantic import BaseModel
class MyTemplate(BaseModel):
name: str
value: int
schema = pydantic_to_template_schema(MyTemplate, "my_template", "A sample template")
Create response formats with multiple templates:
from crayonai_stream import templates_to_response_format, TemplateDefinition
response_format = templates_to_response_format(
TemplateDefinition(
schema=MyTemplate,
name="my_template",
description="A sample template"
)
)
Development
Install development dependencies:
pip install -e ".[dev]"
Run all checks (useful for CI):
make ci
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 crayonai_stream-0.6.2.tar.gz.
File metadata
- Download URL: crayonai_stream-0.6.2.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d2074d2e32d45846d6aea32b3ca5e36bf5aa4125349b435a46486ab0dc59582
|
|
| MD5 |
fb53ec4767f3810d15fd1fbc7e677811
|
|
| BLAKE2b-256 |
e06425cc652afb359d5d5a17b89a8a813d01aeae3b813b4fabcdd42268a08778
|
Provenance
The following attestation bundles were made for crayonai_stream-0.6.2.tar.gz:
Publisher:
publish-pypi-package.yml on thesysdev/crayon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crayonai_stream-0.6.2.tar.gz -
Subject digest:
3d2074d2e32d45846d6aea32b3ca5e36bf5aa4125349b435a46486ab0dc59582 - Sigstore transparency entry: 186765706
- Sigstore integration time:
-
Permalink:
thesysdev/crayon@7441f373d9dded52f95f9e9c4010446b6a0fc1a4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/thesysdev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi-package.yml@7441f373d9dded52f95f9e9c4010446b6a0fc1a4 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file crayonai_stream-0.6.2-py3-none-any.whl.
File metadata
- Download URL: crayonai_stream-0.6.2-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3be620afd0b3960904e0d07cfc731d6273fb01b083d5adc400e165d46ccd6fea
|
|
| MD5 |
0efbcecce841f5c4528f95d402c14c7a
|
|
| BLAKE2b-256 |
f79dc5c718975a72e9bdc59282f299590bf0563d4686bb20793919edf6c23eac
|
Provenance
The following attestation bundles were made for crayonai_stream-0.6.2-py3-none-any.whl:
Publisher:
publish-pypi-package.yml on thesysdev/crayon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crayonai_stream-0.6.2-py3-none-any.whl -
Subject digest:
3be620afd0b3960904e0d07cfc731d6273fb01b083d5adc400e165d46ccd6fea - Sigstore transparency entry: 186765708
- Sigstore integration time:
-
Permalink:
thesysdev/crayon@7441f373d9dded52f95f9e9c4010446b6a0fc1a4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/thesysdev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi-package.yml@7441f373d9dded52f95f9e9c4010446b6a0fc1a4 -
Trigger Event:
workflow_dispatch
-
Statement type: