mypy

Optional static type checker that catches Python bugs before you run your code

Tool
PyPI
v2.3.1
20,597stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
83/100Excellent
Development Activity96
Maintenance52
Community84
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
83/100Excellent
Architecture88
Code Quality90
Innovation85
Learning Curve70

mypy is a static type checker for Python that adds optional, gradual typing on top of the language’s existing type hint syntax (PEP 484 and friends). Rather than requiring a fully-typed codebase up front, mypy lets you annotate incrementally and will infer types where it can, flagging mismatches — calling a function with the wrong argument type, accessing an attribute that doesn’t exist, returning the wrong type — as static errors instead of runtime crashes.

Under the hood mypy is itself written largely in Python and compiled with mypyc (its own sibling project) for speed, and ships as both a CLI (mypy path/to/code) and an importable API for editor/IDE integrations. It’s the reference implementation the Python typing ecosystem is built around, maintained under the official python GitHub organization with backing from Dropbox, Google, Microsoft, and the broader community, and it powers type-checking in most major Python IDEs and CI pipelines.

What You Get

  • A CLI (mypy) that type-checks a file, package, or entire project and reports errors with file/line precision
  • Gradual typing: mix typed and untyped code, and control strictness per-module via --strict, --disallow-untyped-defs, and similar flags
  • Type inference for unannotated local variables and expressions, reducing how much you need to annotate manually
  • Support for the full modern typing feature set: generics, Protocols, TypedDict, overloads, Literal types, and typeshed-provided stubs for the standard library and popular packages
  • A daemon mode (dmypy) and incremental caching for fast repeated type checks in editors and CI
  • Compiled itself with mypyc for significantly faster execution than a pure-Python interpreter run

Common Use Cases

  • Adding a CI gate that fails a build when new code introduces type errors or removes existing type-safety guarantees
  • Incrementally typing a large legacy Python codebase module-by-module without a disruptive big-bang rewrite
  • Powering real-time type-checking and autocomplete in editors (VS Code, PyCharm) via the mypy language server integration
  • Enforcing strict typing on library public APIs so consumers get accurate type information and IDE support
  • Catching None-safety and Optional-handling bugs (e.g. calling a method on a value that might be None) before they hit production

Under The Hood

Architecture - mypy’s core lives in mypy/checker.py (~10,000 lines), which walks a parsed AST performing type inference and constraint checking against the declared/inferred types, coordinating with mypy/semanal.py for semantic analysis and name binding and mypy/build.py for the overall multi-module build graph, dependency ordering, and incremental caching. Type stub resolution (typeshed bundling, third-party stub packages) and plugin hooks (for frameworks like Django/attrs that generate types dynamically) are layered on top of this core pipeline. Tech Stack - Implemented in Python 3, with the performance-critical parts compiled ahead-of-time via mypyc (mypy’s own compiler project, itself a directory in this repo) into C extensions for a substantial speed-up over interpreted execution; packaging uses setuptools with a build-time dependency on typing_extensions, pathspec, and tomli. Code Quality - The mypy/test directory contains an extensive test suite including self-checking (mypy type-checks its own codebase via mypy_self_check.ini), snapshot-style .test data files under test-data/, and a stubtest.py tool for verifying stub accuracy against runtime behavior — reflecting a mature, heavily-tested project after over a decade of development. API Design - The CLI surface is a single mypy entry point with a large but well-documented flag set (--strict, --ignore-missing-imports, per-module overrides via config file), and the library exposes a stable-ish internal API used by editor plugins (dmypy daemon protocol) and IDE integrations, though the internal AST/type APIs are explicitly not a public stability contract.

Used by 28 apps in this directory

Python
66%
Apache 2.0

Agent Control

AI Agents

295

An open-source runtime control plane for AI agents — define safety guardrails once, apply them across agents built on LangChain, CrewAI, Google ADK, or AWS Strands, and update controls without redeploying code.

View details
79
Repo Health
71
Technical
70
Dependency
Built with
Python66%
TypeScript33%
Updated yesterday
Python
100%
Apache 2.0

Agno

Devops · AI Development · Automation

41,774

Build, run, and manage agent platforms with a full production stack — SDK, runtime, and control plane included.

View details
93
Repo Health
87
Technical
67
Dependency
Built with
Python100%
Updated today
Python
49%
Other

Airbyte

Developer Tools · Data Engineering

21,916

Open-source ELT platform with 600+ connectors for moving data from any source to warehouses, lakes, and AI agents.

View details
95
Repo Health
80
Technical
67
Dependency
Built with
Python49%
Kotlin42%
Updated today
Python
90%
Apache 2.0

Apache Airflow

Data Engineering

46,530

Define, schedule, and monitor complex data workflows as Python code — with a powerful UI, 80+ provider integrations, and battle-tested scalability across thousands of production deployments.

View details
96
Repo Health
89
Technical
66
Dependency
Built with
Python90%
Updated today
C++
69%
Apache 2.0

ClickHouse

Databases · Analytics · Data Engineering

49,325

Open-source column-oriented database that delivers real-time analytical queries on petabyte-scale data with millisecond latency.

View details
95
Repo Health
90
Technical
68
Dependency
Built with
C++69%
Python13%
Updated today
TypeScript
84%
Apache 2.0

Continue

Developer Tools · AI Development · AI Code Assistants

35,532

Open-source coding agent for VS Code, JetBrains, and CLI with support for 30+ LLM providers.

View details
87
Repo Health
88
Technical
65
Dependency
Built with
TypeScript84%
Updated today
Go
32%
Apache 2.0

CubeSandbox

Developer Tools · Security · AI Agents

11,247

Instant, concurrent, hardware-isolated MicroVM sandboxes for AI agents — E2B-API compatible, sub-60ms cold starts, and a built-in zero-trust egress proxy, all self-hostable at scale.

View details
83
Repo Health
88
Technical
63
Dependency
Built with
Go32%
Rust31%
C21%
Updated today
Python
99%
MIT

deepagents

AI Agents · AI Development

27,919

The batteries-included Python agent harness — planning, sub-agents, filesystem, shell, memory, and skills bundled in, built on LangGraph.

View details
88
Repo Health
83
Technical
74
Dependency
Built with
Python99%
Updated today
Python
57%
MIT

Docglow

Data Engineering

137

A next-generation documentation site generator for dbt Core projects — lineage explorer, health scoring, and full-text search for teams without access to dbt Cloud's built-in docs features.

View details
67
Repo Health
65
Technical
82
Dependency
Built with
Python57%
TypeScript42%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search