9 Python Packages You Should (Probably) Know
Use what others have already improved to boost your project.
And in most of the time, you will only need the standard library to execute your tasks. But sometimes, using an extra package can be very useful, to abstract a functionality and save you precious time.
In this article I am going to list some packages you might want to consider for your next project.
The idea is to show some nice projects out there that you might not (yet) know. Maybe they can inspire you in some way to create a new project.
Note: these are packages that I have used at least once in my projects. There are a lot of others good ones out there that are out of this list. You can see a good list here.
If you are using MongoDB and want to create a REST API for your database, you need to check the Eve framework. Built on top of Flask, another famous web framework, you can create various endpoints for your resources using a dictionary or a configuration file.
You can configure features such as pagination, filtering, customize endpoints, authentication, versioning, and many others.
And being powered by Flask, you can still use the whole flask extensions that are available in the community to extend your project.
And it automatically generates a OpenAPI page so you can test your API without a third-party application.
If you need to create an API, this is library you should definitely check out.
It has many components already created for you, so that you only focus on creating the presentation of your data.
Creating a new web app to show your data science project might be too much for you. You might want a simple report for your Pandas dataframe or just show the results of some basic calculations you have performed on them.
pandas-profiling is perfect for that. It expands the pandas function
df.describe() generating an interactive HTML report that contains statistics such as:
- Descriptive value, like mean, mode, standard deviation, etc;
- Missing values;
- And many others
It is great as well to get a preview for your dataframe to see what you can do or to get a preliminary analysis.
If you want to create animations, not only for math, this is definitely the library to use.
It was created by Grant Sanderson to animate the videos for his YouTube channel 3Blue1Brown (if you don’t know yet, you should). It started as a side project, but now has a nice community that helps maintaining it.
You can create animated videos with a few lines that will certainly help you visualize or illustrate a problem you have.
Or just for the fun.
It creates the parsers and the arguments directly from the arguments of your function, with the help of python type hints.
def main(name: str):
if __name__ == "__main__":
It doesn’t matter if your code is in the same machine, in another machine in the same network, or in a cloud server in a remote country. ZeroRPC can expose and execute your code as if it is local.
You can even use the command line to expose an existing Python code without having to modify it.
If you need to create a distributed system, consider checking this package.
Creating a great documentation for your project is an important step if you want other people to use it.
All the pages are written using markdown and the documentation is generated using a simple YAML configuration file. After that, you can serve your static files as a beautiful web page.
Huey is a lightweight task queue system with a simple API. It supports multiple features, such as:
- Multi-process, multi-thread or greenlet task execution models.
- Schedule tasks to execute at a given time, or after a given delay, or to be recurring, like a crontab.
- Task prioritization
- Task locking
- Task pipelines and chains
You can add a function to be enqueue with a simple decorator. It’s definitely worth a look.
Although Python has a wide range of libraries and functions that are already inside its standard library, sometimes you might need to use an external one.
This is not an ultimate list, as there are hundreds of other great packages out there (check this github page with some inspiration).
Check them out. Even if you decide not to use, or don’t need them at all, you might get inspired by their code and create another cool package.
If you know a nice package that is not listed here, leave a comment.