Installation Guide

Apathetic Python Schema can be installed using several methods. Choose the one that best fits your project’s needs.

The recommended way to install Apathetic Schema is via PyPI. We prefer poetry over pip for its pyproject.toml support, automatic venv management, and tool configuration without dotfiles.

Using Poetry (Preferred)

poetry add apathetic-schema

Using pip

pip install apathetic-schema

This installation method provides:

Alternative: Stitched Distribution

For projects that prefer a stitched dependency, we also distribute a stitched apathetic_schema.py file that you can download directly from releases.

Download and Use

  1. Download apathetic_schema.py from the latest release
  2. Place it in your project directory
  3. Import it directly:
import apathetic_schema

This method is useful for:

Requirements

Apathetic Python Schema has minimal runtime dependencies — it uses apathetic-utils for TypedDict schema extraction and type checking utilities.

Verification

After installation, verify that it works:

from apathetic_schema import apathetic_schema, ApatheticSchema_ValidationSummary
from apathetic_utils import schema_from_typeddict
from typing import TypedDict

class TestConfig(TypedDict):
    name: str

config = {"name": "test"}
summary = ApatheticSchema_ValidationSummary(valid=True, errors=[], strict_warnings=[], warnings=[], strict=False)
schema = schema_from_typeddict(TestConfig)

apathetic_schema.check_schema_conformance(
    config,
    schema,
    "in test",
    strict_config=False,
    summary=summary,
)

print(f"Validation successful: {summary.valid}")

If the import succeeds and validation works, installation was successful!

Next Steps