skillfed

schematics

Python Data Structures for Humans

schematics v2.1.1 638.4K downloads/30d#5,619 on PyPI2,589
Permissive license BSD Abandoned released

What it is and what it does

Schematics is a Python library for building and validating structured data using type definitions. It lets you declare data models with typed fields (like StringType, URLType, etc.), then validate incoming data against those schemas and convert between formats like JSON. The library is modeled after ORM type systems but has no database layer—it stops at data validation and transformation, leaving persistence to you.

Common uses include documenting API input schemas, validating request payloads, serializing objects to JSON or other formats, and filtering fields based on access control. You define a Model class with typed fields, instantiate it with data, call validate() to check constraints, and use to_primitive() to export as a dictionary or JSON.

Use it for:

  • Validate API request bodies against a schema before processing them
  • Convert between JSON and Python objects with type checking and field filtering
  • Define and document message formats for RPC or other communication protocols
  • Enforce required fields and data types in configuration or input files
  • Serialize domain objects to JSON while hiding fields based on user permissions

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Schematics defines, validates, and transforms Python data structures using type-based schemas, with no database layer—useful for API validation, data serialization, and format conversion.

No—the project is abandoned (last release 2021-08-17, no commits since 2023-07-12). While it has low install friction and a permissive license, the lack of maintenance means no bug fixes, security patches, or compatibility updates for modern Python versions. For new projects, use actively maintained alternatives.

Install

schematics on PyPI

pip

pip install schematics

uv

uv add schematics

poetry

poetry add schematics

Installing schematics

Before you install

Low install friction with no runtime dependencies. However, the project is abandoned—last release was 2021-08-17, with the last commit on 2023-07-12. Maintenance has stopped.

License in practice

BSD license (permissive) means you can use, modify, and distribute the package freely with minimal restrictions, provided you include the license notice.

Quickstart

from schematics.models import Model
from schematics.types import StringType, URLType

class Person(Model):
    name = StringType(required=True)
    website = URLType()

person = Person({'name': 'Joe', 'website': 'http://example.com'})
person.validate()  # raises DataError if invalid
print(person.to_primitive())

Verify before relying

  • Whether the package works reliably with Python versions beyond 3.9, given the last release predates newer Python versions
  • Whether there are known compatibility issues with modern dependency ecosystems or serialization libraries

Package facts

License BSD (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 1,823 days since the last release
Last repo commit
First released
Downloads 638,422/month — #5,619 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: schematics-2.1.1-py2.py3-none-any.whl

Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

python data validation schematype-based data structuresapi input validationdata serialization and transformationjson schema validationstructured data modelsformat conversion library
data-validationschema-definitionabandoned

More Software Development packages