{"id":28311,"library":"superannotate-schemas","title":"SuperAnnotate Schemas","description":"A library providing JSON schemas for SuperAnnotate's data formats, used for validating annotations, exports, and imports. Current version: 1.0.49. Release cadence is irregular, with frequent minor updates.","status":"active","version":"1.0.49","language":"python","source_language":"en","source_url":"https://github.com/superannotateai/superannotate-schemas","tags":["schemas","annotation","validation","json"],"install":[{"cmd":"pip install superannotate-schemas","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Required for schema validation at runtime","package":"jsonschema","optional":false}],"imports":[{"note":"Old path uses dot instead of underscore, common mistake.","wrong":"from superannotate.schemas import AnnotationSchema","symbol":"AnnotationSchema","correct":"from superannotate_schemas import AnnotationSchema"},{"note":"Direct import without path traversal is incorrect.","wrong":"import superannotate_schemas.ExportSchema","symbol":"ExportSchema","correct":"from superannotate_schemas import ExportSchema"}],"quickstart":{"code":"from superannotate_schemas import AnnotationSchema\nimport os\n\napi_key = os.environ.get('SUPERANNOTATE_API_KEY', '')\n# Validate a sample annotation\nannotation = {\"type\": \"polygon\", \"points\": [[0,0],[10,0],[10,10],[0,10]]}\nis_valid = AnnotationSchema.validate(annotation)\nprint(is_valid)","lang":"python","description":"Basic usage to validate an annotation against the schema."},"warnings":[{"fix":"Use from superannotate_schemas import ...","message":"Import path uses underscores: superannotate_schemas (not superannotate.schemas). Many users mistakenly use the dot notation due to the package name.","severity":"gotcha","affected_versions":"all"},{"fix":"Call AnnotationSchema.validate_or_raise(annotation) instead of AnnotationSchema.validate(annotation) to get detailed error.","message":"Validation methods return boolean, not raise exceptions by default. To raise on invalid data, use .validate_or_raise().","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Migrate to AnnotationSchema or ExportSchema.","message":"Some older schema classes like 'OldAnnotationSchema' are deprecated and will be removed in a future version.","severity":"deprecated","affected_versions":"<1.0.0, if applicable"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"pip install superannotate-schemas and then from superannotate_schemas import ...","cause":"Incorrect import path using dot instead of underscore.","error":"ModuleNotFoundError: No module named 'superannotate'"},{"fix":"Check the annotation structure against the schema definition. Use validate_or_raise to see detailed error.","cause":"Annotation does not match the JSON schema. Usually due to missing required fields or wrong data types.","error":"jsonschema.exceptions.ValidationError: ..."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}