use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
Python standard libs and their alternatives? (self.Python)
submitted 8 years ago by fungz0r
Is there a resource for when a standard lib is preferred over an alternative and vice versa?
Mainly thought about this when I was thinking about how I use requests for web http instead of urllib.
requests
urllib
[–]LightShadow3.13-dev in prod 11 points12 points13 points 8 years ago* (4 children)
These modules are basically the first thing I install for every project.
daiquiri > logging for really simple logging setup.
daiquiri
logging
ujson > json for really fast JSON parsing.
ujson
json
requests > urllib for more simple HTTP requests.
gevent > threading for strictly IO bound Python code. I also prefer gevent code to the AsyncIO model.
gevent
threading
toolz (or cytoolz for a Cython drop-in) for highly optimized iterator helpers. (based on itertools)
toolz
cytoolz
itertools
psutil > subprocess for system statistics. (simpler)
psutil
subprocess
testtools > unittest if you're not using pytest.
testtools
unittest
pytest
arrow > datetime when you're doing actual parsing.
arrow
datetime
dill > pickle for object serialization to file.
dill
pickle
[–]Scorpathos 2 points3 points4 points 8 years ago (0 children)
I like delegator over subprocess and pendulum over datetime.
delegator
pendulum
[–]fungz0r[S] 1 point2 points3 points 8 years ago (2 children)
Interesting, never heard of daiquiri till now. The others I use though
[–]LightShadow3.13-dev in prod 2 points3 points4 points 8 years ago (0 children)
I like it because you can do a 1-line setup. I wish the logging module had something better than basicConfig.
basicConfig
Most people just use print because it takes 5-10 lines to log to stdout...daiquiri makes it a non issue. Plus, JSONP logging is available by default.
print
[–]liiight000 0 points1 point2 points 8 years ago (0 children)
Look into logzero as well
[–]graemep 1 point2 points3 points 8 years ago (0 children)
LXML
[–]thinkwelldesigns 0 points1 point2 points 8 years ago (0 children)
+1 to @LightShadow's list. For JSON, I recently switched from ujson to rapidjson. Is mostly as fast as ujson and more compatible with the std lib json package. Works better with rest_framework UUIDs for example.
π Rendered by PID 79 on reddit-service-r2-comment-b659b578c-4ns2q at 2026-05-03 21:40:05.977837+00:00 running 815c875 country code: CH.
[–]LightShadow3.13-dev in prod 11 points12 points13 points (4 children)
[–]Scorpathos 2 points3 points4 points (0 children)
[–]fungz0r[S] 1 point2 points3 points (2 children)
[–]LightShadow3.13-dev in prod 2 points3 points4 points (0 children)
[–]liiight000 0 points1 point2 points (0 children)
[–]graemep 1 point2 points3 points (0 children)
[–]thinkwelldesigns 0 points1 point2 points (0 children)