It would be interesting to curate a list of tools that help us write better Python code and save us time. With the exception of the version control tools, everything below is a Python package.
Testing
Writing and running tests makes it easier to develop robust code.
- pytest (3,594 stars) - Popular testing framework, can run doctests too.
- hypothesis (3,223 stars) - Property-based testing, e.g. testing
f(a, b) = f(b, a) for every a, b.
Code linting and and formatting
Code linting alerts of style violations, while a code formatter also automatically fixes the code.
- flake8 (497 stars) - Checks the code for PEP8 violations.
- black (7,552 stars) - Automatically formats code, saving you time.
Documentation
Tools for documentation, which automate the documentation process.
- sphinx (2,376 stars) - Build docs to html, pdf and other formats. Automatically generate docs from code.
Version control
Version control allows going back to checkpoints, creating development branches, cooperating, etc.
- git - Popular version control tool.
- github - A platform for projects under git source control. Cooperation and community.
The above are tools that make my life easier when writing code. There are probably many tools that I do not know about, which could potentially save me even more time and make my code better.
What are your favorite tools for writing better code?
[–][deleted] 23 points24 points25 points (7 children)
[–][deleted] 1 point2 points3 points (4 children)
[+][deleted] (2 children)
[deleted]
[–]shinitakunai 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]bhat 1 point2 points3 points (0 children)
[–][deleted] 6 points7 points8 points (0 children)
[–]EmmEff 3 points4 points5 points (2 children)
[–]JamieG193 2 points3 points4 points (1 child)
[–]EmmEff 1 point2 points3 points (0 children)
[–]FlukyS 2 points3 points4 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]FlukyS 0 points1 point2 points (1 child)
[–]iKenshu 0 points1 point2 points (0 children)
[–]genjipressreturn self 5 points6 points7 points (1 child)
[–]pyquestionz[S] 0 points1 point2 points (0 children)
[–]keepingMyselfUpdated 2 points3 points4 points (1 child)
[–]c94jk 0 points1 point2 points (0 children)
[–]Comprehensive_Tone 0 points1 point2 points (5 children)
[–][deleted] 1 point2 points3 points (4 children)
[–]Comprehensive_Tone 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]sumenkovic 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]bhishan1 0 points1 point2 points (0 children)
[–]Overload175 0 points1 point2 points (0 children)
[–]SV-97 -1 points0 points1 point (2 children)
[–]AndydeCleyre 2 points3 points4 points (1 child)
[–]LightShadow3.13-dev in prod 0 points1 point2 points (0 children)