Django Code Formatting and Linting Made Easy: A Step-by-Step Pre-commit Hook Tutorial

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

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. django-ecommerce-api

    An E-commerce API built using Django Rest Framework.

    The Django project I am going to use is one of my own which is an e-commerce API built using Django Rest Framework. I will demonstrate the concepts by using this project so you can clone it to your local machine. However, feel free to use alternative projects if you prefer.

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. isort

    A Python utility / library to sort imports.

    isort is a Python utility that helps in sorting and organizing import statements in Python code to create readable and consistent code. It automatically formats import statements in accordance with PEP 8.

  4. pre-commit

    A framework for managing and maintaining multi-language pre-commit hooks.

    Pre-commit is a framework for managing and maintaining multi-language pre-commit hooks. It supports hooks for various programming languages. Using this framework, you only have to specify a list of hooks you want to run before every commit, and pre-commit handles the installation and execution of those hooks despite your project’s primary language.

  5. black-pre-commit-mirror

    - repo: https://github.com/psf/black-pre-commit-mirror rev: 23.9.1 hooks: - id: black language_version: python3.10

  6. black

    The uncompromising Python code formatter

    Black is a Python code formatter that automatically formats Python code to comply with its style guide called PEP 8. PEP 8 is the official style guide for Python code, and it provides recommendations on how to format code for better readability and consistency.

  7. Flake8

    flake8 is a python tool that glues together pycodestyle, pyflakes, mccabe, and third-party plugins to check the style and quality of some python code.

  8. djLint

    ✨ HTML Template Linter and Formatter. Django - Jinja - Nunjucks - Handlebars - GoLang

    - repo: https://github.com/Riverside-Healthcare/djLint rev: v1.32.0 hooks: - id: djlint-reformat-django - id: djlint-django

  9. SaaSHub

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

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

  • Setting up `pre-commit` in a Django project

    4 projects | dev.to | 28 Jun 2024
  • Testing Python Code Using UnitTest

    3 projects | dev.to | 9 Nov 2023
  • Automate Python Linting and Code Style Enforcement with Ruff and GitHub Actions

    9 projects | dev.to | 22 Jul 2023
  • Conversion from the f-string literals to format method in python

    4 projects | /r/learnpython | 10 Jul 2023
  • The Power of Pre-Commit for Python Developers: Tips and Best Practices

    3 projects | dev.to | 1 May 2023

Did you know that Python is
the 2nd most popular programming language
based on number of references?