Skip to content

v2.0.0

Compare
Choose a tag to compare
@seandstewart seandstewart released this 04 Apr 22:43
c22930c

This release brings an entirely new annotation resolution engine which
is backwards-incompatible with v1.

New features include:

  1. typic.protocol for binding a serialization & deserialization
    for any type or annotation.
  2. @typic.constrained for definining restricted versions of
    builtin types.
  3. @typic.settings for resolving the default values of a dataclass
    from your environment variables
  4. A whole new suite of useful types, including:
    • FrozenDict, a hashable, immutable dictionary
    • DSN, a JSON-serializable string-type for your database URIs
    • URL, a JSON-serializable string-type for your URLs
    • Email, a JSON-serializable string-type for emails
    • SecretString, a JSON-serializable string-type for hiding
      secrets when logging or printing
  5. typic.schema for getting a valid JSON Schema definition for
    your classes and type annotations. typical classes also have
    access to this as a classmethod.
  6. typic.primitive for extracting a valid JSON-serializable
    primitive from just about anything. typical classes also have
    access to this as an instance method.
  7. typic.tojson for dumping any value directly to a JSON-compliant string.

And so much more. Check out the documentation for details!