Registry / serialization / coreschema

coreschema

JSON →
library0.0.4pypypi✓ verified 23d ago

coreschema (version 0.0.4) is a Python library for defining and validating data structures, often used in conjunction with Core API. It provides a basic set of schema primitives and a validation mechanism. The library was last released in February 2017 and appears to be in an abandoned or unmaintained state, with its GitHub repository showing no activity for seven years and other projects citing its deprecation.

pip install coreschema
INSTALL
IMPORT
SIG · CORESCHEMA
C
coreschema
serializationpythonv0.0.4
Install
2.6s avg
Import
137ms
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.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.95 runs
installs and imports cleanly · install 0.0s · import 0.142s · 20.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.6s · import 0.132s · 21MB
18MB installed
● package 18MB
Code
Verified usage

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

Schema
from coreschema import schemas
from coreschema import Schema
String
from coreschema import String
Integer
from coreschema import Integer

This quickstart demonstrates defining a simple object schema with required fields and number constraints. The `validate` method is used to check data against the schema, returning a list of `Error` objects for any inconsistencies. An empty list indicates successful validation.

from coreschema import String, Number, Object from collections import namedtuple # Coreschema's internal Error structure for demonstration Error = namedtuple('Error', ['text', 'index']) # Define a simple schema for a user user_schema = Object( properties={ 'name': String(title='User Name', description='The name of the user.'), 'age': Number(minimum=0, maximum=150, description='User\'s age, 0-150.'), 'city': String(default='Unknown', description='City of residence.') }, required=['name', 'age'] ) # Example data valid_data = {'name': 'Alice', 'age': 30} valid_data_with_city = {'name': 'Bob', 'age': 45, 'city': 'New York'} invalid_data_age = {'name': 'Charlie', 'age': 200} # age > 150 invalid_data_missing = {'age': 25, 'city': 'London'} # missing 'name' print("--- Validating Data ---") # Validate valid data errors = user_schema.validate(valid_data) if not errors: print(f"'{valid_data}' is valid.") else: print(f"'{valid_data}' errors: {errors}") # Validate valid data with optional field errors = user_schema.validate(valid_data_with_city) if not errors: print(f"'{valid_data_with_city}' is valid.") else: print(f"'{valid_data_with_city}' errors: {errors}") # Validate invalid age errors = user_schema.validate(invalid_data_age) if not errors: print(f"'{invalid_data_age}' is valid.") else: print(f"'{invalid_data_age}' errors: {errors}") # Validate missing required field errors = user_schema.validate(invalid_data_missing) if not errors: print(f"'{invalid_data_missing}' is valid.") else: print(f"'{invalid_data_missing}' errors: {errors}")
Debug
Known issues
breakingThe `coreschema` library and its related `coreapi` project are considered abandoned and deprecated. Django REST Framework, which previously used CoreAPI, has phased it out in favor of OpenAPI starting from version 3.9. New projects should avoid using `coreschema`.
fix
Migrate to actively maintained schema validation libraries such as Pydantic, Marshmallow, or others that support OpenAPI standards. Consider `pydantic-core` if low-level schema definition is needed, though it's a separate project.
affects: 0.0.1 - 0.0.4
gotcha`coreschema` was last released in 2017 (version 0.0.4) with a 'Development Status :: 3 - Alpha' classifier, indicating it was never considered stable. It was primarily built with Python 2 compatibility in mind, which may lead to unexpected behavior or compatibility issues with modern Python 3 environments.
fix
No direct fix; migration to a modern library is recommended. If absolutely necessary to use, thorough testing on the target Python 3 version is required, and be prepared for potential incompatibilities.
affects: 0.0.1 - 0.0.4
gotchaThe library lacks active development, meaning there will be no new features, bug fixes, or security patches. Its functionality is very basic compared to modern schema validation tools.
fix
Evaluate if the limited feature set meets current project requirements. For robust schema definition, validation, and data transformation, modern alternatives offer significantly more capabilities and ongoing support.
affects: 0.0.1 - 0.0.4
Upgrade
Version history
0.0.4latest on PyPI · released Feb 8, 2017
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
8
Resources
coreschema — pip install coreschema · libregistry