Registry / data / superannotate-schemas

superannotate-schemas

JSON →
library1.0.49pypypiunverified

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.

pip install superannotate-schemas
INSTALL
IMPORT
SIG · SUPERANNOTATE-SCHE
S
superannotate-schemas
datapythonv1.0.49
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

AnnotationSchema
from superannotate_schemas import AnnotationSchema
from superannotate_schemas import AnnotationSchema

Basic usage to validate an annotation against the schema.

from superannotate_schemas import AnnotationSchema import os api_key = os.environ.get('SUPERANNOTATE_API_KEY', '') # Validate a sample annotation annotation = {"type": "polygon", "points": [[0,0],[10,0],[10,10],[0,10]]} is_valid = AnnotationSchema.validate(annotation) print(is_valid)
Debug
Known issues
gotchaImport path uses underscores: superannotate_schemas (not superannotate.schemas). Many users mistakenly use the dot notation due to the package name.
fix
Use from superannotate_schemas import ...
affects: all
gotchaValidation methods return boolean, not raise exceptions by default. To raise on invalid data, use .validate_or_raise().
fix
Call AnnotationSchema.validate_or_raise(annotation) instead of AnnotationSchema.validate(annotation) to get detailed error.
affects: >=1.0.0
deprecatedSome older schema classes like 'OldAnnotationSchema' are deprecated and will be removed in a future version.
fix
Migrate to AnnotationSchema or ExportSchema.
affects: <1.0.0, if applicable
Upgrade
Version history
1.0.49latest on PyPI · released Jun 6, 2024
Audit
Dependencies
jsonschemarequiredRequired for schema validation at runtime
Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources
superannotate-schemas — pip install superannotate-schemas · libregistry