Python Standard Library
Python is popular language where it provides a lot of features. These features provides easy ways to accomplish programming tasks. But only using Python language features is not enough to write successful applications. There is also big need for libraries. Libraries provides easy to to generic functions, classes, lists and various structures.
Python Standard Library is builtin library which comes with python installation to provide different features. In this tutorial we popular use cases and features of Python Standard Library.
If you want to learn how to import following libraries and use them read following post.
Text processing is mainly related with string and text data. There is huge features in text processing libraries.
stringlibrary is used mainly common string operations.
relibrary is used for regular expression operations
readlinelibrary used to read values from user
Binary Data Services
As there is little need binary have little libraries and used to edit and convert binary data.
structlibrary is used to interpret bytes as packed binary data
Mathematics is important part of the applications development. Especially enterprise applications generally need heavy calculations and different mathematical equations. Hopefully Python Standard Library have huge support for this.
mathlibrary used for mathematical functions
cmathlibrary is used for complex numbers
randomis used for pseudo-numbers
statisticsis used for mathematical statistics
File and Directory Access
File and directory access, manipulation and enumeration is another popular usage of libraries.
os.pathlibrary is used for common path name manipulations
statlibrary is used to interpret stats
pathliblibrary is used for object-oriented filesystem paths
There are different data or file compression formats like gzip, rar, lzma, zip etc. Support for these compression algorithms are provided with the libraries.
zipfilelibrary used to work with zip files
tarfilelibrary used to work with tar files
There are different file formats supported by Python Standard Library.
csvlibrary is used to read and write csv files
configparserlibrary is used for configuration files
Security is important part f the today computing. Python Standard Library also provides some of cryptographic services like below.
hashliblibrary is used for secure hashes and message digest
hmaclibrary is used for keyed-hashing for message authentication
secretslibrary is used for generate secure randım numbers and secret management
Operating system libraries provides a lot of features related time, argument parsing, curses etc.
oslibrary is used for miscellaneous features
iolibrary provides core tools for streams
timelibrary is used for time access
loggingis used for logging for system and related events
cursesis used for terminal handling and character-cell displays
Inter-process and Network Communication
Communications between same and remote system processes and network communication is supported with the following libraries.
socketlibrary is used for low-level networking interface
ssllibrary is used for ssl/tls
mmaplibrary is use for memory-mapped file support
signallibrary is used for handlers for asynchronous events
Internet part of the PYthon Standard Library provides a lot of libraries. We will look most known of them.
webbrowserlibrary is used as web-browser controller
cgilibrary provides Common Gateway Interface support
urllibis used for HTTP URL, Request, Response etc.
popliblibrary provides POP3 support
smtplibprovides SMTP support
ipaddresslibrary is used for IPv4/IPv6 manipulation
Multimedia provides multimedia related simple libraries
audiooplibrary provides support for raw audio data manipulation
wavelibrary supports WAV file read and write