Registry / serialization / weblate-schemas

weblate-schemas

JSON →
library2026.4pypypi✓ verified 84d ago

A collection of JSON schemas used by Weblate for various objects and APIs. This library provides a programmatic way to access and retrieve these schemas as Python dictionaries, often used in conjunction with the `jsonschema` library for validation. It follows a calendar versioning scheme (YYYY.M) with regular monthly releases.

pip install weblate-schemas
INSTALL
IMPORT
SIG · WEBLATE-SCHEMAS
W
weblate-schemas
serializationpythonv2026.4
Install
3.1s avg
Import
Disk
25MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2026.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 27.4MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.1s · import 0.000s · 28MB
25MB installed
● package 25MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

get_path
from weblate_schemas import get_path
from weblate_schemas import get_schema
load_schema
from weblate_schemas import load_schema
validate_schema
from weblate_schemas import validate_schema

Demonstrates how to list available schemas and retrieve a specific schema using `get_schema`. The schemas are returned as Python dictionaries, ready for use with a JSON schema validator like `jsonschema` (not directly imported here as it's an external dependency for validation, not schema retrieval).

from weblate_schemas import get_schema, list_schemas import json # List available schemas available_schemas = list_schemas() print(f"Available schemas: {available_schemas[:3]}...") # Retrieve a specific schema (e.g., component.json) try: component_schema = get_schema('component.json') print(f"\nSuccessfully loaded 'component.json' schema. First 100 chars:\n{json.dumps(component_schema, indent=2)[:100]}...") except KeyError: print("\n'component.json' not found. Please check available schemas.") # Example of how you might use it with jsonschema (requires pip install jsonschema) # from jsonschema import validate, ValidationError # data_to_validate = {"name": "My Component", "slug": "my-component"} # try: # validate(instance=data_to_validate, schema=component_schema) # print("\nData is valid against 'component.json' schema.") # except ValidationError as e: # print(f"\nData validation failed: {e.message}")
Debug
Known issues
breakingThe *structure* of specific schemas (e.g., fields, types, required properties) can change between versions. While the `get_schema` Python API remains stable, applications validating against older schema definitions may break with new schema versions.
fix
Always test your schema consumers (e.g., validation logic) after updating `weblate-schemas`. Pin to specific versions (e.g., `weblate-schemas==2025.6`) to ensure schema stability, but be aware this may miss new features or bug fixes.
affects: All versions
gotchaSchema names are case-sensitive and must exactly match the internal registry (e.g., 'component.json' vs 'Component.json'). Requesting a non-existent schema will raise a `KeyError`.
fix
Use `from weblate_schemas import list_schemas; list_schemas()` to get a current list of all available schema names before attempting to retrieve a specific one with `get_schema()`.
affects: All versions
gotchaThis library uses calendar versioning (YYYY.M), meaning new versions are released monthly. This implies frequent updates to schema definitions, which can introduce changes to existing schemas or add new ones.
fix
Be mindful of frequent releases. If strict schema stability is required, pin to a specific `weblate-schemas` version. For development, consider using `pip install --pre weblate-schemas` to get the latest pre-release, but lock down for production.
affects: All versions
Upgrade
Version history
2026.4latest on PyPI · released May 27, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
10
Amazon
1
OpenAI (training)
1
Resources
weblate-schemas — pip install weblate-schemas · libregistry