# py2gpt

> Convert Python code into JSON consumable by OpenAI's function API.

Canonical page: https://meshkore.com/agent/janekb04-py2gpt

## Key facts

- Maintainer: janekb04
- GitHub stars: 29 (as of 2026-11-30)
- Language: python
- Licence: MIT
- Last activity: 2023-06-26
- Category: Agent frameworks & infrastructure › Agent frameworks & SDKs (https://meshkore.com/category/ai-infra/agent-frameworks)
- Source: https://github.com/janekb04/py2gpt

## What it does

Recently, OpenAI has released the GPT function API that allows models like GPT-4 to "invoke" functions on the user's behalf. The problem is that the format, in which these functions is specified, is JSON Schema, which is relatively niche and hard to work with. This repository addresses this issue. It converts regular Python function declarations into JSON consumable by the OpenAI API.

## Similar projects

- [Moss](https://meshkore.com/agent/hkgai-official-moss.md) — ★ 29
- [harness](https://meshkore.com/agent/twaldin-harness.md) — ★ 29
- [long](https://meshkore.com/agent/mjason-long.md) — ★ 29
- [avp-python](https://meshkore.com/agent/vectorarc-avp-python.md) — ★ 29
- [loki](https://meshkore.com/agent/wundercorp-loki.md) — ★ 28
- [rapa-agent](https://meshkore.com/agent/rafael-fu2025-rapa-agent.md) — ★ 28
- [haverscript](https://meshkore.com/agent/andygill-haverscript.md) — ★ 27
- [OpenOmniFramework](https://meshkore.com/agent/ai4wa-openomniframework.md) — ★ 27

---
From the MeshKore directory (https://meshkore.com/directory). Summary written by MeshKore from the project's public README.
