{"id":5598,"library":"coreschema","title":"Core Schema","description":"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.","status":"abandoned","version":"0.0.4","language":"en","source_language":"en","source_url":"https://github.com/core-api/python-coreschema","tags":["schema","validation","API","coreapi","deprecated","abandoned"],"install":[{"cmd":"pip install coreschema","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"symbol":"Schema","correct":"from coreschema import Schema"},{"symbol":"String","correct":"from coreschema import String"},{"symbol":"Number","correct":"from coreschema import Number"},{"symbol":"Object","correct":"from coreschema import Object"},{"symbol":"Array","correct":"from coreschema import Array"},{"symbol":"Union","correct":"from coreschema import Union"}],"quickstart":{"code":"from coreschema import String, Number, Object\nfrom collections import namedtuple\n\n# Coreschema's internal Error structure for demonstration\nError = namedtuple('Error', ['text', 'index'])\n\n# Define a simple schema for a user\nuser_schema = Object(\n    properties={\n        'name': String(title='User Name', description='The name of the user.'),\n        'age': Number(minimum=0, maximum=150, description='User\\'s age, 0-150.'),\n        'city': String(default='Unknown', description='City of residence.')\n    },\n    required=['name', 'age']\n)\n\n# Example data\nvalid_data = {'name': 'Alice', 'age': 30}\nvalid_data_with_city = {'name': 'Bob', 'age': 45, 'city': 'New York'}\ninvalid_data_age = {'name': 'Charlie', 'age': 200} # age > 150\ninvalid_data_missing = {'age': 25, 'city': 'London'} # missing 'name'\n\nprint(\"--- Validating Data ---\")\n\n# Validate valid data\nerrors = user_schema.validate(valid_data)\nif not errors:\n    print(f\"'{valid_data}' is valid.\")\nelse:\n    print(f\"'{valid_data}' errors: {errors}\")\n\n# Validate valid data with optional field\nerrors = user_schema.validate(valid_data_with_city)\nif not errors:\n    print(f\"'{valid_data_with_city}' is valid.\")\nelse:\n    print(f\"'{valid_data_with_city}' errors: {errors}\")\n\n# Validate invalid age\nerrors = user_schema.validate(invalid_data_age)\nif not errors:\n    print(f\"'{invalid_data_age}' is valid.\")\nelse:\n    print(f\"'{invalid_data_age}' errors: {errors}\")\n\n# Validate missing required field\nerrors = user_schema.validate(invalid_data_missing)\nif not errors:\n    print(f\"'{invalid_data_missing}' is valid.\")\nelse:\n    print(f\"'{invalid_data_missing}' errors: {errors}\")","lang":"python","description":"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."},"warnings":[{"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.","message":"The `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`.","severity":"breaking","affected_versions":"0.0.1 - 0.0.4"},{"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.","message":"`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.","severity":"gotcha","affected_versions":"0.0.1 - 0.0.4"},{"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.","message":"The 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.","severity":"gotcha","affected_versions":"0.0.1 - 0.0.4"}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}