2️⃣6️⃣ numbers — Numeric abstract base classes
👆 Kind of like `collections.abc`, but for numbers.
2️⃣7️⃣ math — Mathematical functions
2️⃣8️⃣ cmath — Mathematical functions for complex numbers
2️⃣9️⃣ decimal — Decimal fixed point and floating point arithmetic
👆 Looking to increase floating point accuracy for some computations? Take a look at this!
3️⃣0️⃣ fractions — Rational numbers
👆 Need arbitrary precision? Maybe this will help you.
3️⃣1️⃣ random — Generate pseudo-random numbers
👆 One of the modules I use the most, has many useful functions...
6️⃣6️⃣ os — Miscellaneous operating system interfaces
6️⃣7️⃣ io — Core tools for working with streams
6️⃣8️⃣ time — Time access and conversions
👆 The layman's timing functionality!
6️⃣9️⃣ argparse — Parser for command-line options, arguments and sub-commands
👆Great to build command-line interfaces, this one came to replace `optparse` .
Recently I've seen many people use `click` for this type of thing 🤔
7️⃣0️⃣ getopt — C-style parser for command line options
7️⃣1️⃣ logging — Logging facility for Python
7️⃣2️⃣ logging.config — Logging configuration
7️⃣3️⃣ logging.handlers — Logging handlers
Probably all you need to do proper logging in your programs, instead of using `print`s all over the place!
7️⃣4️⃣ getpass — Portable password input
7️⃣5️⃣ curses — Terminal handling for character-cell displays
7️⃣6️⃣ curses.textpad — Text input widget for curses programs
7️⃣7️⃣ curses.ascii — Utilities for ASCII characters
7️⃣8️⃣ curses.panel — A panel stack extension for curses
From all the modules I never used, `curses` must be the one I've seen the most! I should take a look at it, no?
7️⃣9️⃣ platform — Access to underlying platform’s identifying data
8️⃣0️⃣ errno — Standard errno system symbols
8️⃣1️⃣ ctypes — A foreign function library for Python
At this point I'm not even halfway through and I'm already humbled by the sheer amount of things I didn't even know existed, let alone know how to use...
Did you know that Audacity, the audio editing program, is written in Python.
1️⃣5️⃣2️⃣ audioop — Manipulate raw audio data
1️⃣5️⃣3️⃣ aifc — Read and write AIFF and AIFC files
1️⃣5️⃣4️⃣ sunau — Read and write Sun AU files
1️⃣5️⃣5️⃣ wave — Read and write WAV files
1️⃣5️⃣6️⃣ chunk — Read IFF chunked data
1️⃣5️⃣7️⃣ colorsys — Conversions between color systems
👆 E.g. how would you convert an RGB value to HSL? The formulas can get annoying, so having this to import is great!
1️⃣5️⃣8️⃣ imghdr — Determine the type of an image
1️⃣5️⃣9️⃣ sndhdr — Determine type of sound file
1️⃣6️⃣0️⃣ ossaudiodev — Access to OSS-compatible audio devices
1️⃣9️⃣6️⃣ sys — System-specific parameters and functions
1️⃣9️⃣7️⃣ sysconfig — Provide access to Python’s configuration information
1️⃣9️⃣8️⃣ builtins — Built-in objects
👆 This gives you programmatic access to Python's built-ins.
1️⃣9️⃣9️⃣ __main__ — Top-level script environment
👆 If you had asked me, I would not have said that `__main__` counts as a module from the standard library...
But it's in the documentation, and if I remove it, it's going to break my emoji numbering 😂 So I'll leave it.
2️⃣0️⃣0️⃣ warnings — Warning control
2️⃣0️⃣1️⃣ dataclasses — Data Classes
👆 Want to define a class just as glue for some data? Look here!
2️⃣0️⃣2️⃣ contextlib — Utilities for with-statement contexts
2️⃣0️⃣3️⃣ abc — Abstract Base Classes
👆 If you want to implement some interface-like behaviour, this may be the answer!
2️⃣0️⃣4️⃣ atexit — Exit handlers
👆 Run custom Python code right before your program finishes/exits.
2️⃣0️⃣5️⃣ traceback — Print or retrieve a stack traceback
2️⃣0️⃣6️⃣ __future__ — Future statement definitions
👆 time-travelling right in your code!
2️⃣1️⃣8️⃣ ast — Abstract Syntax Trees
👆 Great if you want to manipulate Python code. By using the abstract syntax tree, you can actually work on the *structure* of the code.
2️⃣1️⃣9️⃣ symtable — Access to the compiler’s symbol tables
2️⃣2️⃣0️⃣ symbol — Constants used with Python parse trees
2️⃣2️⃣1️⃣ token — Constants used with Python parse trees
2️⃣2️⃣2️⃣ keyword — Testing for Python keywords
2️⃣2️⃣3️⃣ tokenize — Tokenizer for Python source
2️⃣2️⃣4️⃣ tabnanny — Detection of ambiguous indentation
👆 This, right here, ladies and gentlemen, wins the prize for the module with the funniest name!
2️⃣2️⃣5️⃣ pyclbr — Python module browser support
👆 No idea what this is 😂
If you type `import this` in a Python REPL, you will be presented with the Zen of Python, a document with some guidelines that you can follow when writing code.