Skip to content

loyada/typedpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Sep 24, 2024
1c73603 · Sep 24, 2024
Feb 27, 2024
Jun 17, 2023
Sep 22, 2024
Jun 17, 2023
Jun 5, 2022
Jun 24, 2023
Aug 16, 2024
Sep 24, 2024
May 13, 2022
Aug 19, 2023
Jun 29, 2023
Dec 8, 2021
Nov 20, 2017
Aug 31, 2022
Jun 7, 2021
Feb 27, 2024
Sep 19, 2021
Jun 7, 2021
Oct 25, 2020
Aug 14, 2023
Aug 26, 2022
Dec 12, 2021
Aug 31, 2022
Sep 24, 2024
Aug 16, 2024
Oct 20, 2020

Repository files navigation

pylint img

Typedpy - Strict Type System for Python

typedpy is a library for type-safe, strict, Python structures. It supports Python 3.9+.

Features

  • Full featured, sophisticated, class-based type system

  • Includes Python stubs generator that provides static type checking within the IDE

  • Supports JSON schema draft4 features, including mapping schema-to-code and code-to-schema

  • Serialization, deserialization between JSON-like dict and typedpy objects, including custom mapping. Support for pickling.

  • Easily extensible. Wrapper of any class as a Field

  • Inheritance/mixins of fields/classes

  • Embedded structures within structures/fields and fields within fields

  • Supports the common collections

  • Immutable Structures/Fields

  • Clean Java-generics-like definitions, but more flexible. e.g.: Set[AnyOf[Integer(minimum=10), Array]], Map[String(maxLength=8), String]

  • No dependencies on third-party libs

There are many examples under "tests/".

Documentation

Detailed documentation is here

Installation

PyPI page is here

Conda-Forge page is here