Skip to main content

LLM-ify your JSON schemas

Project description

llm-schema-lite

PyPI version Python Versions CI codecov License: MIT Code style: ruff

LLM-fy your JSON schemas.

Installation

You can install llm-schema-lite using pip:

pip install llm-schema-lite

Or using uv:

uv pip install llm-schema-lite

Development

This project uses uv for package management and includes pre-commit hooks for code quality.

Setup Development Environment

  1. Install uv if you haven't already:
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Quick setup with Make:
make setup

Or manually:

# Create virtual environment
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install package with dev dependencies
uv pip install -e ".[dev]"

# Install pre-commit hooks
uv pip install pre-commit
pre-commit install
pre-commit install --hook-type commit-msg

Available Make Commands

Run make help to see all available commands:

  • make install - Install package
  • make install-dev - Install with dev dependencies
  • make test - Run tests
  • make test-cov - Run tests with coverage
  • make test-parallel - Run tests in parallel (faster)
  • make test-fast - Run tests excluding slow ones
  • make lint - Run all linters
  • make format - Format code
  • make build - Build package
  • make changelog - Generate changelog
  • make clean - Clean build artifacts

Running Tests

make test
# or
pytest

Code Quality

The project uses several tools to maintain code quality:

  • Ruff: Fast Python linter and formatter (replaces flake8, isort, and more)
  • MyPy: Static type checker for type safety
  • Bandit: Security vulnerability scanner
  • Pre-commit: Git hooks for automated checks
  • Pytest: Testing framework with coverage reporting
# Format code
make format

# Run linters
make lint

# Run pre-commit on all files
make pre-commit-run

# Run tests in parallel (faster for large test suites)
make test-parallel

Changelog Management

This project uses git-changelog with conventional commits:

# Generate changelog
make changelog

Commit message format:

  • feat: - New features
  • fix: - Bug fixes
  • docs: - Documentation changes
  • refactor: - Code refactoring
  • test: - Test changes
  • chore: - Maintenance tasks
  • perf: - Performance improvements

Building and Publishing

Build the package

uv build

Publish to PyPI

# Install twine if needed
uv pip install twine

# Upload to PyPI
twine upload dist/*

Publish to TestPyPI (for testing)

twine upload --repository-url https://test.pypi.org/legacy/ dist/*

License

See the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

llm_schema_lite-0.1.0.tar.gz (66.2 kB view details)

Uploaded Source

Built Distribution

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

llm_schema_lite-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file llm_schema_lite-0.1.0.tar.gz.

File metadata

  • Download URL: llm_schema_lite-0.1.0.tar.gz
  • Upload date:
  • Size: 66.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for llm_schema_lite-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e98838717f5672687b775f4476bfe1a93552ecd75a9bff1591da4067294408d1
MD5 fa25d6e3660f42e38c127b130514e630
BLAKE2b-256 d9bdbe4f6613809c9bc92d64e6610c80ce29951f95bb7cc97263cc2b59793d46

See more details on using hashes here.

File details

Details for the file llm_schema_lite-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_schema_lite-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 052cf7845d82e67251dca9d1a8c32a6ff7bfe2d810510473c7c7d1d84c3193ac
MD5 0b51e69b500a5d1df05c4871aa70baa2
BLAKE2b-256 789461f8a5db9d1ccfbf259cf7873a212b5c23f894fe3df219947fce382a2825

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