Write better Python - with some help!

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SonarLint - Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
  • OPS - Build and Run Open Source Unikernels
  • Scout APM - Less time debugging, more time building
  • GitHub repo pyre-check

    Performant type-checking for python.

    Some other good alternatives for type checking are Pyright (which is seen in VSCode via Microsofts PyLance plugin) and Pyre.

  • GitHub repo black

    The uncompromising Python code formatter

    If you want to speed up your coding and rely on a computer to do the polishing for you, you can use a code formatter to automatically walk through and format your code. In the world of python, Black is one of the most used formatters. It could be compared to Prettier in the world of JS - they are both opinionated formatters, i.e. they make some choices for you. (You don't have to fight your colleague over whether to use single or double quotes anymore! Great!)

  • SonarLint

    Deliver Cleaner and Safer Code - Right in Your IDE of Choice!. SonarLint is a free and open source IDE extension that identifies and catches bugs and vulnerabilities as you code, directly in the IDE. Install from your favorite IDE marketplace today.

  • GitHub repo awesome-flake8-extensions

    :octocat: A curated awesome list of flake8 extensions. Feel free to contribute! :mortar_board:

    In addition to this out of the box -linting, there are loads of flake8 extensions that can help you with for example switching from .format() to using f-strings or checking that your naming follows the PEP8 guidelines. For example, adding flake8-length adds line length checking to the linting.

  • GitHub repo isort

    A Python utility / library to sort imports.

    If you like to keep your imports in tact, there are also rules to enforce a specific order amongst them. One tool that does that is isort. Isort follows the order:

  • GitHub repo flake8-isort

    flake8 plugin that integrates isort

    imports from the same project You can also integrate isort into flake8 using the flake8-isort plugin!

  • GitHub repo pyright

    Static type checker for Python

    Some other good alternatives for type checking are Pyright (which is seen in VSCode via Microsofts PyLance plugin) and Pyre.

  • GitHub repo prettier

    Prettier is an opinionated code formatter.

    If you want to speed up your coding and rely on a computer to do the polishing for you, you can use a code formatter to automatically walk through and format your code. In the world of python, Black is one of the most used formatters. It could be compared to Prettier in the world of JS - they are both opinionated formatters, i.e. they make some choices for you. (You don't have to fight your colleague over whether to use single or double quotes anymore! Great!)

  • OPS

    OPS - Build and Run Open Source Unikernels. Quickly and easily build and deploy open source unikernels in tens of seconds. Deploy in any language to any cloud.

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