Function Schema Generator
A zero-dependency Python micro-tool that uses reflection (inspect) to automatically generate function calling JSON schemas for OpenAI (GPT-4o, Groq, Ollama) and Anthropic (Claude 3/3.5) directly from your Python functions.
Installation
pip install function-schema-generator
Usage
import json
from function_schema_generator import generate_openai_schema, generate_anthropic_schema
def get_stock_price(ticker: str, currency: str = "USD"):
"""Fetches the current stock price for a given ticker symbol."""
pass
# Generate OpenAI Format
openai_schema = generate_openai_schema(get_stock_price)
print("OpenAI Schema:\n", json.dumps(openai_schema, indent=2))
# Generate Anthropic (Claude) Format
anthropic_schema = generate_anthropic_schema(get_stock_price)
print("Anthropic Schema:\n", json.dumps(anthropic_schema, indent=2))
Metadata
Release files for function-schema-generator 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| function_schema_generator-0.1.0.tar.gz | 3.8 kB | With provenance | Details for function_schema_generator-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| function_schema_generator-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for function_schema_generator-0.1.0-py3-none-any.whl |
Total release size: 7.8 kB
Release files / function_schema_generator-0.1.0.tar.gz
| Download URL | function_schema_generator-0.1.0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fbea4718fbc541d731c2e5f9d1f6edc7bb3601e5bd27faf651224a9b6c23fe00
|
|
BLAKE2b-256 checksum How to use checksums |
ce85897dce3b3802cdb2a42366cd3e140b03908cb4502802142ef292315416e5
|
| 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 Aug 26, 2026.
Transparency logRelease files / function_schema_generator-0.1.0-py3-none-any.whl
| Download URL | function_schema_generator-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e3d5111956df1a73066d7dbb9d9b84008d42a602f45f7d87a0c0903040c4a34
|
|
BLAKE2b-256 checksum How to use checksums |
eac416971df44d514cfcf89b2ae0331800f88274976fd6181769d0f97d55f48e
|
| 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 Aug 26, 2026.
Transparency logSecurity for function-schema-generator 0.1.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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for function_schema_generator-0.1.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 Aug 26, 2026.
Transparency logA 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.