Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Typing
  3. pytest-monkeytype

pytest-monkeytype

MITPython1.1.0

A pytest plugin that automatically generates Python type annotations by collecting runtime type information during test execution.

GitHubGitHub
46 stars2 forks0 contributors

Overview

pytest-monkeytype is a pytest plugin that integrates MonkeyType, Instagram's runtime type collection system, into the pytest testing framework. It enables developers to automatically generate Python type annotations by capturing type information while tests run, significantly reducing the manual effort required to add type hints to existing codebases.

Key Features

  • Runtime Type Collection — Captures argument and return value types during test execution and stores them in a SQLite database.
  • Annotation Generation — Uses MonkeyType to generate type stub files or directly apply annotations to source code based on collected data.
  • Seamless Integration — Works as a standard pytest plugin, requiring only a command-line flag to activate type collection.
  • Flexible Output — Supports generating type stubs for review or applying annotations automatically to modules.

Philosophy

The plugin follows a pragmatic approach to type annotation, believing that types should be inferred from actual runtime behavior rather than manually specified, making it easier to adopt type hints in large, untyped codebases.

Quick Stats

Stars46
Forks2
Contributors0
Open Issues2
Last commit5 years ago
CreatedSince 2018

Tags

#typing#pep484#type-inference#python3#python#testing#type-annotations#pytest-plugin#development-tools#static-analysis

Built With

S
SQLite
P
Python
p
pytest

Included in

Typing2.0k
Auto-fetched 1 day ago

Related Projects

pyre-checkpyre-check

Performant type-checking for python.

Stars7,165
Forks452
Last commit1 day ago
pyannotatepyannotate

Auto-generate PEP-484 annotations

Stars1,445
Forks60
Last commit1 month ago
RightTyperRightTyper

A fast and efficient type assistant for Python, including tensor shape inference

Stars358
Forks7
Last commit21 days ago
autotypingautotyping

Automatically add simple type annotations to your code

Stars284
Forks23
Last commit8 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub