Type Hinting - Constrain metaclass of typing.Type

This page summarizes the projects mentioned and recommended in the original post on /r/learnpython

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • mypy

    Optional static typing for Python

    Been looking into it a bit more. I think you're right, it's not supported. Turns out mypy only has very limited support for type hinting metaclasses. This page suggests it may be possible to support this with a mypy plugin, but I'm really not looking to do something that involved. Just wanting to hint an existing API :/ I suppose I could look into tweaking the API to be more hint-able, but I think I'll just accept this piece isn't perfect.

  • typing

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

    but looking at relevant issues on GitHub it seems this has been shot down repeatedly. python/typing#18, python/typing#213

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts