Skip to main content

Better LLMs Structured Outputs

Project description

belso – Better LLMs Structured Outputs

Documentation PyPI version License: MIT

belso is a developer-friendly Python toolkit for defining, validating, and translating structured data in Large Language Models (LLMs). Compatible with major providers. Designed for simplicity, power, and extensibility.


🚀 Overview

belso (Better LLMs Structured Outputs) streamlines how developers work with structured outputs from LLMs. It offers a consistent API for schema definition, validation, and translation—helping you bridge the gap between human language and structured data, regardless of provider.


🔑 Key Features

  • Unified Schema Interface – define once, use everywhere via Python dataclasses or Pydantic models
  • 🔀 Multi-Provider Compatibility – seamless I/O with:
    • OpenAI
    • Anthropic
    • Google AI
    • Mistral AI
    • Hugging Face
    • Ollama
    • LangChain
  • 🔁 Bi-directional Format Translation – convert schemas across LLM formats with a single call
  • 🧱 Supports Nesting & Arrays – works with deeply nested fields and typed collections
  • 🧪 Validation & Inspection – ensure schema integrity with built-in tools
  • 📦 Serialization – import/export schemas via JSON, YAML, and XML
  • Lightweight & Fast – minimal dependencies, optimal for production use

📦 Installation

pip install belso

🧪 Quick Start

Explore the examples directory to see how belso can help you structure LLM outputs with ease.


📚 Documentation

Full documentation is available on the official site. Includes guides, API reference, and advanced usage examples.


📄 License

This project is distributed under the terms of the MIT License.


☕ Support My Work

If you find belso useful, consider supporting the project:

Buy me a coffee

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

belso-0.0.4.tar.gz (30.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

belso-0.0.4-py3-none-any.whl (35.1 kB view details)

Uploaded Python 3

File details

Details for the file belso-0.0.4.tar.gz.

File metadata

  • Download URL: belso-0.0.4.tar.gz
  • Upload date:
  • Size: 30.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for belso-0.0.4.tar.gz
Algorithm Hash digest
SHA256 83f06d105e50ce99c636dbe735d09d84c2d23fe0dbe0fbb673ee7d57eaefddf3
MD5 84482deb10e664e1ec3b1d7eb6ed5573
BLAKE2b-256 045e270038eef5a640428da651d53de73cae5d68e96630a21a8d1106ff7e3746

See more details on using hashes here.

File details

Details for the file belso-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: belso-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 35.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for belso-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9ff5975092111a97a50416bf47fc78e0cc3ec7819b7923eb5f39b5649ffbddf5
MD5 aa9b19978d641d05a8ec0f89e381cd23
BLAKE2b-256 6dac04d67257a3e007bc9bba258a276479fe9a881b3d4efbf9a90a5b8520fe6d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page