I do a lot of Python

https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ" title="Schlange" aria-label="Emoji: Schlange">, but you knew that already, right?
However, there&
#39;s something new: the libraries and tools that I use on every single project. Every. Single. One.
Here are 10 of them. The best ones.

https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ§”" title="Thread" aria-label="Emoji: Thread">

https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ" title="RĂŒckhand Zeigefinger nach unten" aria-label="Emoji: RĂŒckhand Zeigefinger nach unten">

https://abs.twimg.com/emoji/v2/... draggable="false" alt="1âŁ" title="Tastenkappe Ziffer 1" aria-label="Emoji: Tastenkappe Ziffer 1">bpython â A lightweight interpreter
I constantly use the interpreter to test ideas or review the syntax of what I want to do.
bpython is a great alternative to the standard REPL. It offers syntax highlighting, expected parameter list, auto-indentation, and autocompletion.

https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ" title="RĂŒckhand Zeigefinger nach unten" aria-label="Emoji: RĂŒckhand Zeigefinger nach unten">

https://abs.twimg.com/emoji/v2/... draggable="false" alt="2âŁ" title="Tastenkappe Ziffer 2" aria-label="Emoji: Tastenkappe Ziffer 2">rope â A refactoring library
A free utility for refactoring Python code. I personally use it integrated with
@code, but you can also use it directly by writing scripts.
This
@realpython article discusses rope and refactoring in general:
https://realpython.com/python-refactoring/![]()
https://realpython.com/python-re... class="Emoji" style="height:16px;" src="
https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ" title="RĂŒckhand Zeigefinger nach unten" aria-label="Emoji: RĂŒckhand Zeigefinger nach unten">

https://abs.twimg.com/emoji/v2/... draggable="false" alt="3âŁ" title="Tastenkappe Ziffer 3" aria-label="Emoji: Tastenkappe Ziffer 3">flake8 â Enforcing style consistency
This is the first library I install on every project. It&
#39;s a linter that ensures that my code follows good conventions.
This library is a must, especially for teams.
And it supports third-part extensions!
https://flake8.pycqa.org/en/latest/ ![]()
https://flake8.pycqa.org/en/latest... class="Emoji" style="height:16px;" src="
https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ" title="RĂŒckhand Zeigefinger nach unten" aria-label="Emoji: RĂŒckhand Zeigefinger nach unten">

https://abs.twimg.com/emoji/v2/... draggable="false" alt="4âŁ" title="Tastenkappe Ziffer 4" aria-label="Emoji: Tastenkappe Ziffer 4">black â Formatting my code
If flake8 is the first library I install, black is number two.
It&
#39;s a tool to automatically format my code. It does so keeping compatibility with a standard style guide. I also use it integrated with
@code.
https://github.com/psf/black ![]()
https://github.com/psf/black... class="Emoji" style="height:16px;" src="
https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ" title="RĂŒckhand Zeigefinger nach unten" aria-label="Emoji: RĂŒckhand Zeigefinger nach unten">

https://abs.twimg.com/emoji/v2/... draggable="false" alt="5âŁ" title="Tastenkappe Ziffer 5" aria-label="Emoji: Tastenkappe Ziffer 5">venv â Virtual environments
Every Python developer should master virtual environments and use them for every project.
There are several ways to create virtual environments but since Python 3.3, I mostly use the standard venv module.
https://docs.python.org/3/library/venv.html![]()
https://docs.python.org/3/library... class="Emoji" style="height:16px;" src="
https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ" title="RĂŒckhand Zeigefinger nach unten" aria-label="Emoji: RĂŒckhand Zeigefinger nach unten">

https://abs.twimg.com/emoji/v2/... draggable="false" alt="6âŁ" title="Tastenkappe Ziffer 6" aria-label="Emoji: Tastenkappe Ziffer 6">logging â The standard logging facility
It might be time to stop cluttering your code with print statements and start using logging like a grown-up

https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ" title="Face savouring food" aria-label="Emoji: Face savouring food">
logging is a standard Python module.
You can find more information in this
@realpython article:
https://realpython.com/python-logging/ ![]()
https://realpython.com/python-lo... class="Emoji" style="height:16px;" src="
https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ" title="RĂŒckhand Zeigefinger nach unten" aria-label="Emoji: RĂŒckhand Zeigefinger nach unten">

https://abs.twimg.com/emoji/v2/... draggable="false" alt="7âŁ" title="Tastenkappe Ziffer 7" aria-label="Emoji: Tastenkappe Ziffer 7">sphinx â Generating documentation
Whenever I need to package all my docstrings as a nice HTML documentation site, I go to sphinx.
There are a ton of things about sphinx! It took me some time to get the hang of it, but now I constantly use it.
https://www.sphinx-doc.org/en/master/ ![]()
https://www.sphinx-doc.org/en/master... class="Emoji" style="height:16px;" src="
https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ" title="RĂŒckhand Zeigefinger nach unten" aria-label="Emoji: RĂŒckhand Zeigefinger nach unten">

https://abs.twimg.com/emoji/v2/... draggable="false" alt="8âŁ" title="Tastenkappe Ziffer 8" aria-label="Emoji: Tastenkappe Ziffer 8">pytest â For testing my code
I do a lot of TDD, so pytest is always there with me.
It&
#39;s very simple to get started with it. At the same time, it&
#39;s very robust, extensible, and so far, I&
#39;ve found everything I ever needed right there.
Site:
https://docs.pytest.org/en/stable/ ![]()
https://docs.pytest.org/en/stable... class="Emoji" style="height:16px;" src="
https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ" title="RĂŒckhand Zeigefinger nach unten" aria-label="Emoji: RĂŒckhand Zeigefinger nach unten">
pytest â For testing my codeI do a lot of TDD, so pytest is always there with me. It& #39;s very simple to get started with it. At the same time, it& #39;s very robust, extensible, and so far, I& #39;ve found everything I ever needed right there.Site: https://docs.pytest.org/en/stable... class="Emoji" style="height:16px;" src=" " title="https://abs.twimg.com/emoji/v2/... draggable="false" alt="8âŁ" title="Tastenkappe Ziffer 8" aria-label="Emoji: Tastenkappe Ziffer 8">pytest â For testing my codeI do a lot of TDD, so pytest is always there with me. It& #39;s very simple to get started with it. At the same time, it& #39;s very robust, extensible, and so far, I& #39;ve found everything I ever needed right there.Site: https://docs.pytest.org/en/stable... class="Emoji" style="height:16px;" src=" " class="img-responsive" style="max-width:100%;"/>

https://abs.twimg.com/emoji/v2/... draggable="false" alt="9âŁ" title="Tastenkappe Ziffer 9" aria-label="Emoji: Tastenkappe Ziffer 9">coverage â Understanding your test coverage
The library determines which lines of your code are executable, and which have been executed by the tests.
It gives me an idea of how much code is currently not exercised by my pytest suite.
https://github.com/nedbat/coveragepy![]()
https://github.com/nedbat/co... class="Emoji" style="height:16px;" src="
https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ" title="RĂŒckhand Zeigefinger nach unten" aria-label="Emoji: RĂŒckhand Zeigefinger nach unten">

https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ" title="Taste 10" aria-label="Emoji: Taste 10">faker â Generating fake data
I discover faker very recently, and it&
#39;s great! You can use it to generate all sorts of fake data that you can use as part of your tests or for whatever you need.
There&
#39;s even a pytest plugging which is a bonus!
https://github.com/joke2k/faker ![]()
https://github.com/joke2k/fa... class="Emoji" style="height:16px;" src="
https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ" title="RĂŒckhand Zeigefinger nach unten" aria-label="Emoji: RĂŒckhand Zeigefinger nach unten">
Let me know what are the libraries and tools that you always use in your projects. I&
#39;m always looking for ways to improve this setup!
Tip: mention @twtextapp on a Twitter thread with the keyword âunrollâ to get a link to it.