Python Types

Open-source Python projects categorized as Types

Top 19 Python Type Projects

  • mypy

    Optional static typing for Python

    Project mention: It's Time for a Change: Datetime.utcnow() Is Now Deprecated | | 2023-11-19

    It's funny you should say this.

    Reading this article prompted me to future-proof a program I maintain for fun that deals with time; it had one use of utcnow, which I fixed.

    And then I tripped over a runtime type problem in an unrelated area of the code, despite the code being green under "mypy --strict". (and "100% coverage" from tests, except this particular exception only occured in a "# pragma: no-cover" codepath so it wasn't actually covered)

    It turns out that because of some core decisions about how datetime objects work, ` <` type-checks but gives a TypeError at runtime. Oops. (cause discussed at length in but without action for 3 years)

    One solution is apparently to use `datetype` for type annotations (while continuing to use `datetime` objects at runtime):

  • pytype

    A static type analyzer for Python code

    Project mention: A Tale of Two Kitchens - Hypermodernizing Your Python Code Base | | 2023-11-12

    Pyre from Meta, pyright from Microsoft and PyType from Google provide additional assistance. They can 'infer' types based on code flow and existing types within the code.

  • Onboard AI

    Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at

  • typeshed

    Collection of library stubs for Python, with static types

    Project mention: What's the point of using `Any` in Union, such as `str | Any` | /r/learnpython | 2023-08-17

    "csv.pyi is from VS Code Pylance extension" is misleading. Yes, it's included in the code base of the extension, but it's likely originally from python/typeshed. I diffed csv.pyi in the extension and the repository, and they're exactly the same.

  • Schematics

    Python Data Structures for Humans™.

  • typing

    Python static typing home. Hosts the documentation and a user help forum.

    Project mention: Writing Python like it’s Rust | /r/programming | 2023-05-21
  • polyfactory

    Simple and powerful factories for mock data generation

    Project mention: Announcing Polyfactory - a powerful mock data generator for dataclasses, Pydantic and more | /r/Python | 2023-04-16

    If you'd like to contribute, check out the project on GitHub, and if you want to chat you're welcome to join us on the Litestar Discord!

  • sqlalchemy-stubs

    Mypy plugin and stubs for SQLAlchemy

  • InfluxDB

    Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.

  • traits

    Observable typed attributes for Python classes (by enthought)

  • typed-argument-parser

    Typed argument parser for Python

    Project mention: I am sick of writing argparse boilerplate code, so I made "duckargs" to do it for me | /r/Python | 2023-03-03

    Hmm… did you try such approaches, as [click]( or[tap](

  • pyanalyze

    A Python type checker

    Project mention: GitHub - quora/pyanalyze: A Python type checker | /r/Python | 2023-05-24
  • typedload

    Python library to load dynamically typed data into statically typed data structures

    Project mention: Show HN: Up to 100x Faster FastAPI with simdjson and io_uring on Linux 5.19 | | 2023-03-06

    Author of typedload here!

    FastAPI relies on (not so fast) pydantic, which is one of the slowest libraries in that category.

    Don't expect to find such benchmarks on the pydantic documentation itself, but the competing libraries will have them.


  • lagom

    📦 Autowiring dependency injection container for python 3 (by meadsteve)

  • pfun

    Functional, composable, asynchronous, type-safe Python.

  • celery-types

    :seedling: Type stubs for Celery and its related packages

  • Maat

    Validation and transformation library powered by deductive ascending parser. Made to be extended for any kind of project.

    Project mention: [Guide] A Tour Through the Python Framework Galaxy: Discovering the Stars | /r/coder_corner | 2023-04-29

    Try msgspec | Maat | turbo for fast serialization and validation

  • compressio

    Lossless in-memory compression of pandas DataFrames and Series powered by the visions type system. Up to 10x less RAM needed for the same data.

  • thsl

    thsl: A typed configuration language.

    Project mention: Is there any interest in a typed configuration language? | /r/Python | 2023-02-15

    I call it thsl for Typed Human-readable Serialization Language. The main idea is to be a configuration language similar to yaml but with advanced type support. This is to avoid the problem of a config file getting deserialized into inconsistent data types. See The Norway Problem.

  • typebuf

    Dead simple way to create shared type definitions between applications

  • db-introspector-gadget

    This is a CLI tool that can introspect MySQL or Postgres databases and generate a python file that contains TypedDict definitions for the tables and columns in the provided database schema.

    Project mention: First Rust CLI Project, would love some feedback | /r/rust | 2023-08-26

    Here's the link to the source:

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2023-11-19.

Python Types related posts


What are some of the best open-source Type projects in Python? This list will help you:

Project Stars
1 mypy 16,822
2 pytype 4,410
3 typeshed 3,850
4 Schematics 2,571
5 typing 1,470
6 polyfactory 763
7 sqlalchemy-stubs 551
8 traits 406
9 typed-argument-parser 400
10 pyanalyze 275
11 typedload 238
12 lagom 218
13 pfun 141
14 celery-types 53
15 Maat 29
16 compressio 27
17 thsl 1
18 typebuf 0
19 db-introspector-gadget 0
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives