Python Mypy

Open-source Python projects categorized as Mypy

Top 23 Python Mypy Projects

  • strawberry

    A GraphQL library for Python that leverages type annotations 🍓

  • Project mention: My PHP Problems | news.ycombinator.com | 2024-02-20

    have a look to http://strawberry.rocks for Python.

    I've still to find a better code first implementation too

  • returns

    Make your functions return something meaningful, typed, and safe!

  • Project mention: This Week in Python (February 23, 2024) | dev.to | 2024-02-23

    returns – Make your functions return something meaningful, typed, and safe

  • 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.

    InfluxDB logo
  • refurb

    A tool for refurbishing and modernizing Python codebases (by dosisod)

  • django-stubs

    PEP-484 stubs for Django

  • Project mention: Mypy 1.6 Released | news.ycombinator.com | 2023-10-17

    Pyright doesn't work with Django, as Django's so dynamic that it requires a plugin to infer all types correctly. Sadly, even mypy with plugins is a mess to get set up in vscode, especially if you want it to use the same config as you use for ci checks from the command line.

    We use mypy + [django-stubs](https://github.com/typeddjango/django-stubs) (in a huge Django + drf project at day job) which includes a plugin for mypy allowing it to recognize all reverse relations and manager methods. Mypy is still really rough around the edges. The cli args are poorly documented, and how they correspond to declarations in a mypy.ini / pyproject.toml is mysterious. Match-statements still have bugs even a year after release. Exclusion of untyped / partially typed files and packages we've had to solve with grep filtering mypy's output for our whitelisted set of files, as it's been unable to separate properly between errors you care about (in your own codebase) and errors in others code (dependencies, untypable dynamic python packages etc).

    The largest issue IMO is that mypy tried to adapt a java / OOP style way of type system onto python, instead of recognizing the language's real power within duck typing and passing structural types around. Typescript chose the right approach here, modelling javascript the way it is actually written, favoring structural over nominal typing, instead of the archaic and now left-behind way of Java-style OOP that has influenced mypy.

    There was a recently accepted PEP which allowed for limited dataclass transforms, enough to cover the @attr.s usecase for both mypy and pyright, but nowhere near expressive enough to cover django's models and ORM sadly. It's probably impossible / undesirable to allow for such rich plugins, so i see the future for proper pluginless typing to be more akin to how pydantic / normal dataclasses solve typing, by starting with a specification of the types, deriving its runtime implementation, instead of plugins having to reverse the type representation of a custom DSL.

  • result

    A simple Rust like Result type for Python 3. Fully type annotated. (by rustedpy)

  • Project mention: Ask HN: Anyone looking for contributors for their open source projects | news.ycombinator.com | 2024-03-21

    https://github.com/rustedpy/result

    Small Python library, slowly and steadily growing in use.

  • nbQA

    Run ruff, isort, pyupgrade, mypy, pylint, flake8, and more on Jupyter Notebooks

  • Deal

    🤝 Design by contract for Python. Write bug-free code. Add a few decorators, get static analysis and tests for free.

  • SaaSHub

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

    SaaSHub logo
  • classes

    Smart, pythonic, ad-hoc, typed polymorphism for Python

  • aiomonitor

    aiomonitor is module that adds monitor and python REPL capabilities for asyncio application

  • sqlalchemy-stubs

    Mypy plugin and stubs for SQLAlchemy

  • python-blueprint

    🐍 Example Python project using best practices 🥇

  • Project mention: Which scaffolding package should I use? | /r/Python | 2023-11-02

    I used https://github.com/johnthagen/python-blueprint to build https://github.com/DaveCoDev/not-again-ai. It uses poetry to manage dependencies, sets up automatic linting, testing, and type checking with nox and gets it running with GitHub Actions. It is continually being updated and stays up to date modern Python tooling (ruff, nox, poetry, etc). Not sure why the comments are being so discouraging, but regardless if you are looking to publish a polished library, its super helpful to have these things setup for you.

  • mypy_boto3_builder

    Type annotations builder for boto3 compatible with VSCode, PyCharm, Emacs, Sublime Text, pyright and mypy.

  • nitpick

    Enforce the same settings on multiple projects

  • typedload

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

  • lagom

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

  • Wagtail-Pipit

    Pipit is a Wagtail CMS boilerplate which aims to provide an easy and modern developer workflow with a React-rendered frontend.

  • ancv

    Renders your (JSON) resume/CV for online & pretty terminal display

  • Project mention: Show HN: Tech Jobs on the Command Line | news.ycombinator.com | 2024-03-06

    There is something similar https://github.com/alexpovel/ancv/

  • cachew

    Transparent and persistent cache/serialization powered by type hints

  • phantom-types

    Phantom types for Python.

  • mmpm

    MagicMirror Package Manager

  • docopt-ng

    Humane command line arguments parser. Now with maintenance, typehints, and complete test coverage.

  • pfun

    Functional, composable, asynchronous, type-safe Python.

  • pandas-stubs

    Pandas type stubs. Helps you type-check your code. (by VirtusLab)

  • SaaSHub

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

    SaaSHub logo
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).

Python Mypy related posts

  • infer-types: A CLI tool to automatically add type annotations into Python code. Must have tool for annotating existing code.

    1 project | /r/coding | 7 Feb 2023
  • mypy-baseline: Integrate mypy in seconds with existing codebase. A friendly CLI tool to make mypy report only new type violations and ignore existing ones.

    1 project | /r/coolgithubprojects | 20 Jan 2023
  • Creating Videos, Tutorials and other Resources for Starlite

    1 project | /r/Python | 15 Jan 2023
  • Pyright: Static Type Checker for Python

    10 projects | news.ycombinator.com | 2 Jan 2023
  • How to handle the strongest developer wanting to use a language nobody else knows on a project with a tight deadline?

    1 project | /r/ExperiencedDevs | 29 Dec 2022
  • mypy-baseline: Integrate mypy in seconds with existing codebase. A friendly CLI tool to make mypy report only new type violations and ignore existing ones.

    1 project | /r/pythoncoding | 27 Dec 2022
  • Release: Fast Query Parsers

    2 projects | /r/Python | 26 Dec 2022
  • A note from our sponsor - SaaSHub
    www.saashub.com | 20 May 2024
    SaaSHub helps you find the best software and product alternatives Learn more →

Index

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

Project Stars
1 strawberry 3,797
2 returns 3,304
3 refurb 2,452
4 django-stubs 1,467
5 result 1,375
6 nbQA 974
7 Deal 698
8 classes 641
9 aiomonitor 626
10 sqlalchemy-stubs 563
11 python-blueprint 536
12 mypy_boto3_builder 490
13 nitpick 384
14 typedload 255
15 lagom 250
16 Wagtail-Pipit 227
17 ancv 223
18 cachew 207
19 phantom-types 183
20 mmpm 175
21 docopt-ng 173
22 pfun 147
23 pandas-stubs 118

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com