SoFunction
Updated on 2024-11-17

7 Great Tools Every Python Developer Should Know (Double Your Efficiency)

Python started as a small open source language and now it has become one of the popular programming languages for developers.


Today I'm going to share with you 7 tools that feel interesting and useful to all Python developers, and I'm sure they'll come up often in your work to boost productivity.

1、The F*ck

When we forget that some package is here or there, The F*ck solves the problem elegantly. All you have to do is type "Fuck" and it will tell you what went wrong.

It is a very popular item on that list and will continue to be. Installation is as follows:

# mac 
brew install thefuck 
# other 
pip install thefuck 

2、Ansible

Ansible has been sweeping the world for a few years now. If you're DevOps, or have ever had to automate on multiple computers, you're in for a real pain. That's why everyone uses Ansible.

Ansible is by far the easiest IT automation system to use. It manages machines very quickly and in parallel, ofc dreaming of a learning curve.

After starting a new server or aggregation and collecting logs on the master node. with or without installing all of the required packages.Ansible has your back and now offers popular integrations from large vendors such as Microsoft's Azure.

Developed by Red Hat, we know that open source is at its core, and that's something that's really needed in an automation tool that aims to cross-integrate a lot of different things.Ansible hides the mystery of how it works and how it gets done. It converts difficult tasks into repeatable scripts.

(computer) file

/ansible/latest/installation_guide/intro_installation.html

3、Black

Black is presumably the Python code formatting tool you've been looking for. You will stop manual formatting and start enjoying life again.Black can provide you with the speed and freedom to get rid of annoying formatting procedures. As of now the tool has acquired 1.98W stars.

mounting

pip install git+git:///psf/black 

Usage

black {source_file_or_directory} 

4、Python Fire

Python Fire automatically generates a command line interface for any possible Python object. Yes, you heard it right, this program is really great!

import fire 
 
class Calculator(object): 
 """A simple calculator class.""" 
 
 def double(self, number): 
  return 2 * number 
 
if __name__ == '__main__': 
 (Calculator) 

This code defines a class and the important code happens at the bottom. As we can see, we wrapped the object in ("OurClass"), and now we can use it on the command line like this.

python  double 42 
>> 84 

5、TQDM

Tqdm is a fast, extensible Python progress bar that adds a progress alert message to long Python loops, the user just needs to wrap the arbitrary iterator tqdm(iterator).

I remember the first time I browsed through the paper I saw some code pop up for TQDM. it was simple, but also stupid. All it did was print a nice progress bar in the output window.

I realize this may be useless to many. However, if you frequently loop traverse for machine learning or crawling content from websites, this tool is very useful.


6、Cookiecutter

Have you ever started a new project? Great, that means you need Cookiecutter, and as you know, starting a new project usually involves creating a lot of sample code, and that's where Cookiecutter comes in.

Cookiecutter can be easily used from the command line to download and set up an entire project. Whatever you are looking for, make sure someone has already done most of the work for you. Save yourself time and use Cookiecutter To find sample projects, go to GitHub and search for cookie-cutter projects. Thousands are available for you to choose from and customize.

Cookiecutter can be used directly from the console and setting up the project is very simple.

# Create project from the  repo template 
# You'll be prompted to enter values. 
# Then it'll create your Python package in the current working directory, 
# based on those values. 
$ cookiecutter /audreyr/cookiecutter-pypackage 

7、FastAPI

FastAPI is a modern, fast (and high-performance) networking framework for building APYs with Python 3.6+ based on standard Python type hints.

The main features are:

  • Fast: very high performance, on par with Nodejs and Go.
  • Rapid coding: increase the speed of developing functionality by about 200% to 300%
  • Fewer errors: about 40% reduction in human (developer) induced errors
  • Intuitive: great editorial support. Done anywhere. Less debugging time
  • Simple: designed to be easy to use and learn. Less time reading documentation

github link

/tiangolo/fastapi

reach a verdict

Python is not just an awesome programming language. It changes the world. I've taken to occasionally browsing GitHub for new open source projects. Every time I check, I'm amazed by what amazing people around the world have made for us. They build these tools for programmers like us to use and speed up our daily processes.

[Editor's Pick]

PHP full-stack series of courses nine of the ThinKPHP framework and the development of real-world cases New version of the response to the actual development of the big data interview tutorials Representatives recommended the development of minors-only cell phone: can only use the minors-only network and software Developing from scratch visualization of the big screen production platform Python was exploded a big Bug, attackers can be remotely Code Execution Vulnerability!

To this point this article on each Python developers should know the 7 good tools (double the efficiency) of the article is introduced to this, more related Python developer tools content please search for my previous articles or continue to browse the following related articles I hope you will support me in the future more!