π EXCLUSIVE: /library/index.html - Uncensored 2025
The Python Standard LibraryΒΆ
While The Python Language Reference describes the exact syntax and semantics of the Python language, this library reference manual describes the standard library that is distributed with Python. It also describes some of the optional components that are commonly included in Python distributions.
Pythonβs standard library is very extensive, offering a wide range of facilities as indicated by the long table of contents listed below. The library contains built-in modules (written in C) that provide access to system functionality such as file I/O that would otherwise be inaccessible to Python programmers, as well as modules written in Python that provide standardized solutions for many problems that occur in everyday programming. Some of these modules are explicitly designed to encourage and enhance the portability of Python programs by abstracting away platform-specifics into platform-neutral APIs.
The Python installers for the Windows platform usually include the entire standard library and often also include many additional components. For Unix-like operating systems Python is normally provided as a collection of packages, so it may be necessary to use the packaging tools provided with the operating system to obtain some or all of the optional components.
In addition to the standard library, there is an active collection of hundreds of thousands of components (from individual programs and modules to packages and entire application development frameworks), available from the Python Package Index.
- Introduction
- Built-in Functions
- Built-in Constants
- Built-in Types
- Truth Value Testing
- Boolean Operations β
and,or,not - Comparisons
- Numeric Types β
int,float,complex - Boolean Type -
bool - Iterator Types
- Sequence Types β
list,tuple,range - Text and Binary Sequence Type Methods Summary
- Text Sequence Type β
str - Binary Sequence Types β
bytes,bytearray,memoryview - Set Types β
set,frozenset - Mapping Types β
dict - Context Manager Types
- Type Annotation Types β Generic Alias, Union
- Other Built-in Types
- Special Attributes
- Integer string conversion length limitation
- Built-in Exceptions
- Text Processing Services
stringβ Common string operationsstring.templatelibβ Support for template string literalsreβ Regular expression operationsdifflibβ Helpers for computing deltastextwrapβ Text wrapping and fillingunicodedataβ Unicode Databasestringprepβ Internet String Preparationreadlineβ GNU readline interfacerlcompleterβ Completion function for GNU readline
- Binary Data Services
- Data Types
datetimeβ Basic date and time typeszoneinfoβ IANA time zone supportcalendarβ General calendar-related functionscollectionsβ Container datatypescollections.abcβ Abstract Base Classes for Containersheapqβ Heap queue algorithmbisectβ Array bisection algorithmarrayβ Efficient arrays of numeric valuesweakrefβ Weak referencestypesβ Dynamic type creation and names for built-in typescopyβ Shallow and deep copy operationspprintβ Data pretty printerreprlibβ Alternaterepr()implementationenumβ Support for enumerationsgraphlibβ Functionality to operate with graph-like structures
- Numeric and Mathematical Modules
numbersβ Numeric abstract base classesmathβ Mathematical functionscmathβ Mathematical functions for complex numbersdecimalβ Decimal fixed-point and floating-point arithmeticfractionsβ Rational numbersrandomβ Generate pseudo-random numbersstatisticsβ Mathematical statistics functions
- Functional Programming Modules
- File and Directory Access
pathlibβ Object-oriented filesystem pathsos.pathβ Common pathname manipulationsstatβ Interpretingstat()resultsfilecmpβ File and Directory Comparisonstempfileβ Generate temporary files and directoriesglobβ Unix style pathname pattern expansionfnmatchβ Unix filename pattern matchinglinecacheβ Random access to text linesshutilβ High-level file operations
- Data Persistence
- Data Compression and Archiving
- The
compressionpackage compression.zstdβ Compression compatible with the Zstandard formatzlibβ Compression compatible with gzipgzipβ Support for gzip filesbz2β Support for bzip2 compressionlzmaβ Compression using the LZMA algorithmzipfileβ Work with ZIP archivestarfileβ Read and write tar archive files
- The
- File Formats
- Cryptographic Services
- Generic Operating System Services
osβ Miscellaneous operating system interfacesioβ Core tools for working with streamstimeβ Time access and conversionsloggingβ Logging facility for Pythonlogging.configβ Logging configurationlogging.handlersβ Logging handlersplatformβ Access to underlying platformβs identifying dataerrnoβ Standard errno system symbolsctypesβ A foreign function library for Python
- Command-line interface libraries
argparseβ Parser for command-line options, arguments and subcommandsoptparseβ Parser for command line optionsgetpassβ Portable password inputfileinputβ Iterate over lines from multiple input streamscursesβ Terminal handling for character-cell displayscurses.textpadβ Text input widget for curses programscurses.asciiβ Utilities for ASCII characterscurses.panelβ A panel stack extension for cursescmdβ Support for line-oriented command interpreters
- Concurrent Execution
threadingβ Thread-based parallelismmultiprocessingβ Process-based parallelismmultiprocessing.shared_memoryβ Shared memory for direct access across processes- The
concurrentpackage concurrent.futuresβ Launching parallel tasksconcurrent.interpretersβ Multiple interpreters in the same processsubprocessβ Subprocess managementschedβ Event schedulerqueueβ A synchronized queue classcontextvarsβ Context Variables_threadβ Low-level threading API
- Networking and Interprocess Communication