{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/12"}],"enrichment":{"capability":"Warlock creates self-validating Python objects using JSON schema, automatically enforcing type and structure constraints on object attributes and tracking changes as JSON Patch documents.","skillfed_tags":["schema-validation","json-patch","data-modeling"],"use_cases":["Build domain models with automatic type enforcement, catching invalid assignments at runtime instead of downstream","Track object mutations as JSON Patch documents for audit logs, change notifications, or state synchronization","Validate API request/response payloads by wrapping them in schema-backed models before processing","Generate model classes dynamically from external JSON schema definitions without hand-coding validators","Enforce data contracts in collaborative systems where multiple components share the same schema definition"],"what_it_does":"Warlock is a Python library that generates model classes from JSON schemas, binding validation logic directly to object instances. When you define a schema and use warlock.model_factory() to create a class, instances of that class automatically validate all attribute assignments against the schema constraints\u2014rejecting invalid types, disallowing undeclared properties (if additionalProperties is false), and raising InvalidOperation exceptions on violations.\n\nThe library integrates jsonschema for validation and jsonpatch for change tracking. Every mutation to a validated object is recorded, and you can retrieve a JSON Patch document describing all changes since the object was created. This makes warlock useful for scenarios where you need runtime type safety, audit trails of object modifications, or serializable representations of state changes.","worth_installing":"Yes, if you need runtime validation and change tracking for Python objects. The package is stable, has no known vulnerabilities, and low install friction. The aging maintenance (441 days since last release) is a minor concern but not a blocker given the Production/Stable status and active repository. Install it for schema-driven model validation; avoid it if you prefer external validation frameworks or don't need JSON Patch tracking."},"id":"warlock","links":{"html":"https://skillfed.io/packages/warlock","md":"https://skillfed.io/packages/warlock.md","pypi":"https://pypi.org/project/warlock/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-05-30","license_spdx":"Apache-2.0","license_treatment":"permissive","name":"warlock","python_support":"supports_current","summary":"Python object model built on JSON schema and JSON patch."},"popularity":{"monthly_downloads":372321,"position":7163,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.1.0"}
