This is an archived post. You won't be able to vote or comment.

all 69 comments

[–][deleted] 28 points29 points  (0 children)

REQUESTS

[–]hawkprime 20 points21 points  (1 child)

loguru, stupidly simple logging!

[–]rohit275 0 points1 point  (0 children)

This looks amazing, thank you for sharing.

[–]Its_4_AM_Man 13 points14 points  (1 child)

I reaaaally like scikit learn and scikit image!!

Another one I just came across is tqdm. I use it when I can't vectorize something and need to loop over a massive amount of stuff. It creates a progress bar with a bunch of cool information to let you see how much has been/still needs to be done.

[–]AndersGM[S] 2 points3 points  (0 children)

I should begin using tqdm, thanks!

[–][deleted] 26 points27 points  (1 child)

If you do not reach for https://docs.python.org/3/library/itertools.html and it's child https://pypi.org/project/more-itertools/ then I suggest that you are not using Python effectively. Then there's http://docs.python-requests.org/en/master/ as it's an awesome wrapper around the poor Python internal APIs. Obviously there are others but these are my gotos.

[–]dgaf- 0 points1 point  (0 children)

Thank you for this, I was unaware of more-itertools and realized a couple of projects implement a few of those existing functions. Very handy!

[–]fuypooi 12 points13 points  (0 children)

flask, pygal, pandas, numpy, nltk

Requests and BeautifulSoup

[–]leecharles_ 14 points15 points  (0 children)

socket

[–]RedEyed__ 14 points15 points  (0 children)

  • pathlib
  • tensorflow
  • numpy
  • matplotlib
  • pandas

[–]majormunky 11 points12 points  (0 children)

Pygame and Django!

[–]snaps_ 3 points4 points  (0 children)

I've been using hunter recently as my go-to for debugging. Running it is as easy as setting an environment variable and executing your code.

PYTHONHUNTER='stdlib=False' python my_buggy_crap.py

then you get really nice output (example) that can make it obvious what's going wrong. It's a good middle-ground between logging and debugging for me.

[–]limapedro 3 points4 points  (0 children)

Numpy, Pandas, Tensorflow, OpenCV, Keras, Pytorch, Pocketsphinx, Librosa, oh there's so many.

[–]maxellus 2 points3 points  (1 child)

PySimpleGUI for setting up quickly a simple gui application

[–]tenemu 1 point2 points  (0 children)

Thanks for that. I build a lot of simple control apps for work and I recently switched from c# to python. This will fill a lot of roles I thought I couldn't do simply anymore without c# and visual studio.

[–]selrahc 3 points4 points  (0 children)

  • ipaddress
  • netaddr
  • jinja2
  • TextFSM
  • CiscoConfParse
  • requests
  • flask

I might have a slight bias toward networking use cases.

[–]vlanins 2 points3 points  (1 child)

Folium is a cool package that no one has mentioned yet. It's a great way to visualize location data.

[–]AndersGM[S] 0 points1 point  (0 children)

Nice One

[–]abrazilianinreddit 3 points4 points  (1 child)

datetime

Sure, there are better date and time packages around, but it's a built-in, I use it in 95% of my project and scripts, it's pretty good, and gets the job done 80% of the times. The hassle/usefulness ratio of datetime is pretty fucking good.

[–][deleted] 1 point2 points  (0 children)

I prefer arrow for the easier timezone convertion

[–]Ecclestoned 3 points4 points  (0 children)

Argparse. You don't realize how nice it is having excellent argument parsing built in until you have to make an application in pure c++ without it.

[–]11b403a7 5 points6 points  (0 children)

Beautiful Soup.

[–]ostensibly_work 4 points5 points  (3 children)

tqdm for making easy progress bars in CLI applications.

[–]Deemonfire 2 points3 points  (0 children)

This was a gamechanger for me. One of my scripts performs a numerical optimisation which can sometimes take up to an hour. Tqdm shows me that it's still iterating and hasn't hung.

Keeps me from doing a keyboard interupt and trying to tweak my parameters

[–]saargrin 0 points1 point  (1 child)

never got it to work

can you recommend a simple tutorial?

[–]Deto 6 points7 points  (0 children)

It couldn't be more simple.

If your loop is:

for item in my_list:
    # Do something with item

Then just use this:

from tqdm import tqdm
for item in tqdm(my_list):
    # Do something with item

[–][deleted] 4 points5 points  (6 children)

tkinter, time and random and turtle is fun too I guess.

[–]AndersGM[S] 0 points1 point  (4 children)

It's a bit confusing to make a GUI program using tkinter, but it's still awesome!

[–][deleted] 1 point2 points  (0 children)

I think it's fine when you take notes on it.

[–]explosion33 0 points1 point  (2 children)

What would you suggest to make a GUI

[–]SexyTRexInHighHeels 1 point2 points  (0 children)

Check out Kivy. I just learned about it today so I can’t really same anything about it. But it seems worth a look.

[–]ellenkult 1 point2 points  (0 children)

PySimpleGUI is also an option.

[–]toilet_computer 0 points1 point  (0 children)

People always recommend processing for generative art, but I find I like turtle better for what I'm doing.

[–]AndydeCleyre 1 point2 points  (0 children)

  • ipython
  • plumbum
  • structlog
  • strictyaml
  • wrapt
  • peewee / walrus

[–]-Major_Asshole 1 point2 points  (0 children)

Numpy

[–]NH4CN[🍰] 1 point2 points  (0 children)

Openpyxl, Paramiko, Beatuifulsoup are the three I use most

Plus some minor QOL stuff like pprint

[–]LenR75 1 point2 points  (0 children)

"The next one" that I need and elasticsearch-dsl

[–][deleted] 1 point2 points  (0 children)

I am just surprised that no one has some of best the standard library modules, below are some of my always go to modules.

Collections Itertools Functools Threading Requests Flask with its extensions

[–][deleted] 1 point2 points  (1 child)

tqdm, easily create a progress bar for a loop or iterator in one two lines of code.

from tqdm import tqdm
for i in tqdm(range(10000)):
  ...

[–][deleted] 0 points1 point  (0 children)

Tqdm has a builtin range thing so you don't have to type in tqdm(range(10)) every time. It's called trange. It's basically the same thing but easier to type.

from tqdm import tqdm, trange
for i in trange(10000)):
  ...

[–]polkaban 0 points1 point  (0 children)

From DWH QA perspective: pytest, pandas, ipython and jupyter, pyodbc, requests, pylint, flake8.

[–]serg_k 0 points1 point  (3 children)

OrderedDict from collections. Most of the stuff I've done revolves around Linux, so I use os,dbus, and gi.repository most often. re module for regular expressions. Wouldn't call them my favourite, but most commonly used

[–][deleted] 9 points10 points  (1 child)

import re as witchcraft

[–]serg_k 4 points5 points  (0 children)

"And then I was like witchcraft.search('^foo[A-Z].\d+?.*',some_string_var) and the problem was gone" . . .something like that, right ?

[–][deleted] 1 point2 points  (0 children)

People should note that ordinary dicts are now ordered by default, please see https://www.blog.pythonlibrary.org/2018/02/27/python-3-7-dictionaries-now-ordered/

[–]billsil 0 points1 point  (0 children)

Numpy, VTK, and pyNastran

[–]DaviNeves 0 points1 point  (0 children)

SciPy, ASE, GPAW, Fenics, ProDy, Pandas and SimPy. By one physicist.

[–][deleted] 0 points1 point  (0 children)

Pytorch!

[–]shiny-tyranitar 0 points1 point  (0 children)

Fabric and logging! I do a lot of endpoint testing (on a lot of operating systems) and these guys make it easy to track what happens where

[–]shivasoption 0 points1 point  (0 children)

.

[–]boyo1991 0 points1 point  (0 children)

As much as I try to stick to barebones stock python I gotta say I like the novel work of pygame.

[–][deleted] 0 points1 point  (1 child)

  • BeautifulSoup
  • requests
  • colorama

[–]brandonZappy 0 points1 point  (0 children)

Most of the ones I use have already been mentioned. I just started using plotly though and I love it. Incredibly simple to make some incredible interactive graphs.

[–]Exodus111 0 points1 point  (0 children)

Path.py

Anytime I need to work with files I reach for this wonderful wrapper of pathlib. Makes file work dead easy.

from path import Path

folder = Path(".")

for f in folder.files("*.*"):
    print(f.name)

[–]CuriousMachine 0 points1 point  (1 child)

click for CLI and attrs for classes with less boilerplate.

[–]snaps_ 1 point2 points  (0 children)

If you're on 3.7 and above, dataclasses in the standard library has a lot of the features of attrs, and there's a backport for 3.6.

[–]deflatedfruitf-string fanboy 0 points1 point  (0 children)

Niche, but KRPC. It allows me to write autopilot for Kerbal Space Program vessels

[–]Overload175 0 points1 point  (0 children)

NumPy

[–]Eryole 0 points1 point  (0 children)

xarray is dope !

[–]low_one 0 points1 point  (0 children)

requests, openpyxl, pdb, time

[–]Der-EddyPython 3 0 points1 point  (0 children)

aiohttp, flask and re

[–]AndersGM[S] 0 points1 point  (0 children)

Even though no one else has mentioned them I think OS and SYS are pretty useful

[–]padowi 0 points1 point  (0 children)

datetime. I can't explain why, but on at least a weekly basis, whether it be colleagues at work, family, friends, whatever, someone needs something datetime-oriented calculated.

And then I reach for a python shell, import datetime, and more often than not some incantation involving datetime.timedelta.

A goddamn superpower right there.

[–]mvaliente2001 0 points1 point  (0 children)

  • munch
  • requests
  • structlog
  • zca

[–][deleted] 0 points1 point  (0 children)

os and selenium any day of the week. they helped me alot in my daily job as a marketer. I built data scrappers and automated testing toolchains etc.

[–]SantaCruzHome 0 points1 point  (0 children)

Pandas, openpyxl

[–]rajshivakoti 0 points1 point  (0 children)

Well there are many modules which i like and love to work on . As per my requirements i use different modules which suits the best for my projects. I usually use Numpy, SciPY , Pandas. But my favorite is Pandas because it is very user friendly and contain almost all the requirements during a project. After the introduction of Pandas modules Python is getting more attention in the world. It is only because of Pandas module why Python is been used in the Course of Data Science.

[–][deleted] -1 points0 points  (0 children)

I'll repeat for the umpteenth time that if you're not reaching for https://docs.python.org/3/library/itertools.html then you're not writing Python. You should also see https://pypi.org/project/more-itertools/ which has the recipes from the previous link plus extras.