8

20 Python Packages That You Must Try

 3 years ago
source link: https://levelup.gitconnected.com/20-python-packages-that-you-must-try-a81862c913f6
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Responses (2)

Worth reading and practising! Thank you so much!
Worth Reading. Appreciate your knowledge sharing

You have 2 free member-only stories left this month.

20 Python Packages That You Must Try

That Makes Your Life Easier

Image for post
Image for post

Python is the most used programming language in the world of programming. It is one of the best choices for a beginner. The thing that attracts people towards python is simplicity and easy syntax. Python is an interpreted language so it becomes much easier to find bugs in the code. It is created by Guido van Rossum and first released in 1991, and since then the community of python developers is rising day by day with a large number of people. According to some resources, python has a community of over 10 million people. It is used by many multi-billion companies like Google, Amazon, Facebook, and more.

I am using python for the last 1 and a half years, and the thing that I most like about python is its One-Liners and Packages, and it is also the reason for me choosing python over any other language.

In this blog, I will introduce you to the 15 python packages that are very useful and you must try them. Let’s start.

1. Colorama

Colorama is a python package that is used to make your terminal looks better. it can be used to add colors to the terminal.

Installation: pip install colorama

Image for post
Image for post
Colorama Example

2. Pynput

This library is used to control the moment of external devices like a mouse and keyboard. Using some simple lines of code, we can control the keyboard and mouse using the library. The best application of this library is to create a keylogger using it. The below code explains the implementation of keylogger using the library.

Installation: pip install Pynput

3. Progress bars: progress and tqdm

Progress: Using this library we can create a progress bar with less effort.

Installation: pip install progress

from progress.bar import Bar
bar = Bar('Loading', max=20)
for i in range(20):
# Any Task
bar.next()
bar.finish()

The below Animation shows the different bars we can create using progress.

Image for post
Image for post
Animation by Giorgos Verigakis from progress

tqdm: It also does the same job but looks more efficient and up to date with modern programming.

Installation: pip install tqdm

Image for post
Image for post
source: https://github.com/tqdm/tqdm

4. google trans

Googletrans Library is a free and unlimited python library that is an implementation of Google’s translate API. Using this library, you can create a language translator with just a few lines of code.

Installation: pip install googletrans

You can also go further and create a GUI which translates one language into another.

5. google

The google package allows you to search for a query and finds the links related to it and returns all the links. we can also customize the number of the links to be returned.

Installation: pip install google

6. Pillow

Pillow is a python library used for image manipulation. It can be used to create thumbnails, convert between file formats, rotate, apply filters, display images, and more. It is an ideal library if you want to perform tasks in batches.

Installation: pip install pillow

To get a quick feel of the library, here is code which you can display an image and change it to grayscale.

Image for post
Image for post
Conversioin of Original Image to GrayScale

Read The Full Documentation For Full Features.

7. wikipedia

The wikipedia package allows us to interact with Wikipedia from our python script. Using this, we can search for anything from the terminal.

Installation: pip install wikipedia

8. Speech Recognition

Speech is a python library that is used to recognize voice and convert it into text. It recognizes speech with the support of several engines and APIs. It works even in offline mode.

Installation: pip install SpeechRecognition

The below code recognize your voice, converts it into text, and then prints it on the terminal.

9. Ipython

Image for post
Image for post
Source: python screenshots page

This library gives us the feature of using Ipython shell in the terminal, Qt console, and a web browser via the HTML notebook. It is the core of Jupyter notebooks. Find the full documentation here. Below I have listed some features of Ipython.

  • Comprehensive object introspection.
  • Input history, persistent across sessions.
  • Caching of output results during a session with automatically generated references.
  • Extensible tab completion, with support by default for completion of python variables and keywords, filenames, and function keywords.
  • Extensible system of ‘magic’ commands for controlling the environment and performing many tasks related to IPython or the operating system.
  • Session logging and reloading.
  • Extensible syntax processing for special purpose situations.
  • Access to the system shell with user-extensible alias system.
  • Easily embeddable in other Python programs and GUIs.
  • Integrated access to the pdb debugger and the Python profiler.

10. wxpython

Image for post
Image for post

wxPython is a GUI toolkit for python. It is a powerful wrapper for many computer software that can be implemented on a variety of different platforms. It is a cross-platform library. Many developers have found wxPython very effective as the best alternative to Tkinter.

11. Poetry

It is an easy to use and simple package in python. It allows you to manage python packaging and version control of your project. While your project depends upon many libraries, poetry allows you to control them easily.

Installation: pip install poetry

Image for post
Image for post
source : https://github.com/python-poetry/poetry

12. Pygame

pygame is the love of many python developers. It is used to create games using python. It is a cross-platform library that works on almost every platform. Although it's a full-fledged game engine, you can also use this library to simply play an MP3 file right from your Python scripts. It consists of both Computer Graphics and Sound libraries.

Games and applications written on PyGame are compatible with all SDL supported operating systems. They can also able to run on androids and tablets, as well.

Installation: pip install pygame

PyGame has its own website, pygame.org, which includes tutorials and installation instructions.

13. Text Blob

TextBlob is a Python library for processing textual data. It provides a simple API for diving into common natural language processing (NLP) tasks such as part-of-speech tagging, noun phrase extraction, sentiment analysis, classification, translation, and more.

Installation: pip install textblob

The official Quickstart.

14. OpenCV

Image for post
Image for post

OpenCV is the most popular library in computer vision. It is originally written in C and C++. It’s now available in python also. It is originally developed by intel. The library is a cross-platform open-source library. It is free to use. OpenCV is a highly optimized library with its main focus on real-time applications.

Installation: pip install opencv-python

You can refer this article for a complete tutorial from reading images to detecting faces on them.

15. win10 toast

It is an easy-to-use Python library for displaying Windows 10 Toast Notifications which is useful for Windows GUI development.

Installation: pip install win10toast

Application: Creating a reminder application

Image for post
Image for post
“Screen Shot Of The Toast Notification by win10toast-Image by author”

16. playsound

As the name suggest this library is used to play an audio file in python.

Installation: pip install playsound

Application: Creating Music Player Using Python

17. webbrowser

This Python package is used to interact with a webbrowser. It is used to open different links in the browser given by a user from the command line.

Installation: pip install webbrowser

Application: Automating Your Daily Work Applications

18. Python-dateutil

This Python package is the extension of python datetime module. it provides vast features and functionality.

Installation: pip install python-dateutil

19. Setuptools

This Python package is the father of all the packages in Python. It is used to create packages in python.

Installation: pip install setuptools

20. pyfiglet

pyfiglet python package is used to write funky text in the terminal. This is one of my favorite packages to use when I create CLI applications.

Installation: pip install pyfiglet

Image for post
Image for post

Thanks For Reading 😀, Follow Pythoneers To Get Connected With Me


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK