Skip to content

Conversation

@akhundMurad
Copy link
Owner

@akhundMurad akhundMurad commented Jan 5, 2026

refactor: reorganize core modules

  • move TypeID implementation, factory, parsing, validation, constants, and errors into typeid.core
  • add typeid.codecs.base32 and keep typeid.base32 as a compatibility re-export
  • update public imports and tests to use new module paths
  • update CLI to live in typeid.cli.main and fix project script entrypoint
  • keep legacy modules (typeid.typeid, typeid.factory, typeid.validation, typeid.errors, typeid.constants) as shims

feat(pydantic): add Pydantic v2 integration with TypeIDField

  • introduce optional pydantic dependency (v2)
  • add TypeIDField for validating and serializing TypeID values
  • enforce TypeID prefix validation via generic field syntax
  • ensure JSON serialization outputs canonical string form
  • add integration tests covering parsing, validation, and serialization
  • add framework integrations and improve documentation structure

- move TypeID implementation, factory, parsing, validation, constants, and errors into typeid.core
- add typeid.codecs.base32 and keep typeid.base32 as a compatibility re-export
- update public imports and tests to use new module paths
- update CLI to live in typeid.cli.main and fix project script entrypoint
- keep legacy modules (typeid.typeid, typeid.factory, typeid.validation, typeid.errors, typeid.constants) as shims
- introduce optional pydantic dependency (v2)
- add TypeIDField for validating and serializing TypeID values
- enforce TypeID prefix validation via generic field syntax
- ensure JSON serialization outputs canonical string form
- add integration tests covering parsing, validation, and serialization
…arsing

- allow TypeIDField[Literal["prefix"]] (in addition to string/tuple forms)
- use TypeID.from_string for parsing and simplify serialization/prefix checks
- apply minor formatting/cleanup in cli init and errors import
@akhundMurad akhundMurad self-assigned this Jan 5, 2026
@akhundMurad akhundMurad merged commit 303f31c into main Jan 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants