{"categories":[{"label":"Quality Assurance","url":"https://skillfed.io/packages/category/software-development-quality-assurance/2"}],"enrichment":{"capability":"MonkeyType collects runtime types of function arguments and return values, then automatically generates type stub files or applies draft type annotations directly to your Python code.","skillfed_tags":["type-checking","code-generation","static-analysis"],"use_cases":["Quickly add type annotations to an existing untyped codebase by running your test suite or representative workload under MonkeyType","Generate stub files for modules to enable static type checking without modifying the original source","Bootstrap type safety in legacy Python code where manual annotation would be time-consuming","Identify type inconsistencies by comparing inferred types across different execution paths or test cases","Support Python 3.7+ codebases that need gradual typing adoption with minimal upfront effort"],"what_it_does":"MonkeyType is a runtime type collection and annotation tool that hooks into Python's function call mechanism to observe the actual types flowing through your code, then uses that data to generate type annotations. It works by running your code under sys.setprofile instrumentation, recording argument and return types into a SQLite database, and then either outputting stub files or modifying your source code directly to add the inferred annotations.\n\nThe tool is designed as a first-pass annotation generator: it produces concrete type hints based on what it observes at runtime, which may be narrower than the full capability of your functions. For example, a function that works with any numeric type will be annotated with the specific type it saw during execution. The generated annotations are meant to be reviewed and refined by a developer, not used blindly.","worth_installing":"Yes, if you need to add type annotations to existing untyped Python code and are willing to review and refine the generated hints. The tool is stable (Production/Stable status) and has low install friction, but the aging maintenance status means you should verify it works with your Python version and check for any open issues matching your use case before committing to it in a critical workflow."},"id":"monkeytype","links":{"html":"https://skillfed.io/packages/monkeytype","md":"https://skillfed.io/packages/monkeytype.md","pypi":"https://pypi.org/project/monkeytype/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2023-03-20","license_spdx":null,"license_treatment":"permissive","name":"MonkeyType","python_support":"supports_current","summary":"Generating type annotations from sampled production types"},"popularity":{"monthly_downloads":356424,"position":7282,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"23.3.0"}
