Releases: mikewolfd/msgspec-schemaorg
v0.2.1c
v0.2.1b
v0.1.5
This release was automatically created by the GitHub Actions workflow.
v0.1.4
This release was automatically created by the GitHub Actions workflow.
v0.1.1 - URL Validation and Typing Improvements
Refactor: URL Validation and Typing Improvements
This release overhauls the handling and validation of URL fields to align with msgspec 0.19.0 capabilities and improve robustness.
Key Changes:
- feat(validation): Switched URL validation from a custom
URLclass and converter to usingtyping.Annotated[str, msgspec.Meta(pattern=URL_PATTERN)]. This leveragesmsgspec's built-in, efficient pattern matching for validation. - fix(generator): Updated the code generation logic (
generate.py) to correctly include necessary imports (typing.Annotated,msgspec.Meta) when generating models with URL fields. - fix(mapping): Updated the internal Schema.org-to-Python type mapping (
mapping.py) to reflect the newAnnotatedapproach for URLs. - test: Added a new test suite (
test_url_validation.py) specifically for verifying the URL regex pattern and the validation behavior withinmsgspec.Structs. - test: Refactored existing tests that were skipped or failing due to the previous incompatible URL validation method. All tests now pass.
- docs: Updated
README.mdto accurately describe the pattern-based URL validation mechanism and remove references to the old converter method.
Notes:
This refactor resolves the incompatibility issues encountered with the previous URL validation approach in msgspec v0.19.0. The new method is more idiomatic, performant, and directly uses msgspec's intended validation features.
v0.1.0 - Initial Release of msgspec-schemaorg
v0.1.0
First release of msgspec-schemaorg. Provides Schema.org types as Python structs using the high-performance msgspec library.
Features
- Complete Schema.org core vocabulary (900+ classes)
- Proper handling of circular dependencies
- ISO8601 date/time parsing
- Organized by category with flat imports
- Test suite with 100% coverage
Performance
30x faster JSON serialization/deserialization than equivalent Pydantic models.
Usage
from msgspec_schemaorg.models import Person
person = Person(name="Jane Doe", jobTitle="Developer")See examples/ directory for more patterns.
Limitations
Currently only includes core Schema.org vocabulary, no extensions yet.