Skip to content

Releases: mikewolfd/msgspec-schemaorg

v0.2.1c

Choose a tag to compare

@github-actions github-actions released this 18 May 00:32

This release was automatically created by the GitHub Actions workflow.

v0.2.1b

Choose a tag to compare

@mikewolfd mikewolfd released this 17 May 23:13

Added Enumeration Models

v0.1.5

Choose a tag to compare

@github-actions github-actions released this 28 Mar 20:43

This release was automatically created by the GitHub Actions workflow.

v0.1.4

Choose a tag to compare

@github-actions github-actions released this 28 Mar 16:27

This release was automatically created by the GitHub Actions workflow.

v0.1.1 - URL Validation and Typing Improvements

Choose a tag to compare

@mikewolfd mikewolfd released this 28 Mar 14:11

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 URL class and converter to using typing.Annotated[str, msgspec.Meta(pattern=URL_PATTERN)]. This leverages msgspec'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 new Annotated approach for URLs.
  • test: Added a new test suite (test_url_validation.py) specifically for verifying the URL regex pattern and the validation behavior within msgspec.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.md to 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

Choose a tag to compare

@mikewolfd mikewolfd released this 27 Mar 19:12

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.