Python
  • Home
    • Contributing Learn how to contribute to the Python projects
    • Code of Conduct Review the etiquette for interacting with the Python community
    • Security Overview of Python's security protocols
    • The PSF Details about the Python Software Foundation
    • Changelog All changes in the current major version
    • Discord Help Forum Dedicated Discord help forum
    • GitHub Discussions GitHub Discussions
  • Sponsor
/
  • What’s New in Python
    • What’s New In Python 3.14
    • What’s New In Python 3.13
    • What’s New In Python 3.12
    • What’s New In Python 3.11
    • What’s New In Python 3.10
    • What’s New In Python 3.9
    • What’s New In Python 3.8
    • What’s New In Python 3.7
    • What’s New In Python 3.6
    • What’s New In Python 3.5
    • What’s New In Python 3.4
    • What’s New In Python 3.3
    • What’s New In Python 3.2
    • What’s New In Python 3.1
    • What’s New In Python 3.0
    • What’s New in Python 2.7
    • What’s New in Python 2.6
    • What’s New in Python 2.5
    • What’s New in Python 2.4
    • What’s New in Python 2.3
    • What’s New in Python 2.2
    • What’s New in Python 2.1
    • What’s New in Python 2.0
    • Changelog
  • The Python Tutorial
    • 1. Whetting Your Appetite
    • 2. Using the Python Interpreter
    • 3. An Informal Introduction to Python
    • 4. More Control Flow Tools
    • 5. Data Structures
    • 6. Modules
    • 7. Input and Output
    • 8. Errors and Exceptions
    • 9. Classes
    • 10. Brief Tour of the Standard Library
    • 11. Brief Tour of the Standard Library — Part II
    • 12. Virtual Environments and Packages
    • 13. What Now?
    • 14. Interactive Input Editing and History Substitution
    • 15. Floating-Point Arithmetic: Issues and Limitations
    • 16. Appendix
  • Python Setup and Usage
    • 1. Command line and environment
    • 2. Using Python on Unix platforms
    • 3. Configure Python
    • 4. Using Python on Windows
    • 5. Using Python on macOS
    • 6. Using Python on Android
    • 7. Using Python on iOS
    • 8. Editors and IDEs
  • The Python Language Reference
    • 1. Introduction
    • 2. Lexical analysis
    • 3. Data model
    • 4. Execution model
    • 5. The import system
    • 6. Expressions
    • 7. Simple statements
    • 8. Compound statements
    • 9. Top-level components
    • 10. Full Grammar specification
  • The Python Standard Library
    • Introduction
    • Built-in Functions
    • Built-in Constants
    • Built-in Types
    • Built-in Exceptions
    • Text Processing Services
      • string — Common string operations
      • re — Regular expression operations
      • difflib — Helpers for computing deltas
      • textwrap — Text wrapping and filling
      • unicodedata — Unicode Database
      • stringprep — Internet String Preparation
      • readline — GNU readline interface
      • rlcompleter — Completion function for GNU readline
    • Binary Data Services
      • struct — Interpret bytes as packed binary data
      • codecs — Codec registry and base classes
    • Data Types
      • datetime — Basic date and time types
      • zoneinfo — IANA time zone support
      • calendar — General calendar-related functions
      • collections — Container datatypes
      • collections.abc — Abstract Base Classes for Containers
      • heapq — Heap queue algorithm
      • bisect — Array bisection algorithm
      • array — Efficient arrays of numeric values
      • weakref — Weak references
      • types — Dynamic type creation and names for built-in types
      • copy — Shallow and deep copy operations
      • pprint — Data pretty printer
      • reprlib — Alternate repr() implementation
      • enum — Support for enumerations
      • graphlib — Functionality to operate with graph-like structures
    • Numeric and Mathematical Modules
      • numbers — Numeric abstract base classes
      • math — Mathematical functions
      • cmath — Mathematical functions for complex numbers
      • decimal — Decimal fixed-point and floating-point arithmetic
      • fractions — Rational numbers
      • random — Generate pseudo-random numbers
      • statistics — Mathematical statistics functions
    • Functional Programming Modules
      • itertools — Functions creating iterators for efficient looping
      • functools — Higher-order functions and operations on callable objects
      • operator — Standard operators as functions
    • File and Directory Access
      • pathlib — Object-oriented filesystem paths
      • os.path — Common pathname manipulations
      • fileinput — Iterate over lines from multiple input streams
      • stat — Interpreting stat() results
      • filecmp — File and Directory Comparisons
      • tempfile — Generate temporary files and directories
      • glob — Unix style pathname pattern expansion
      • fnmatch — Unix filename pattern matching
      • linecache — Random access to text lines
      • shutil — High-level file operations
    • Data Persistence
      • pickle — Python object serialization
      • copyreg — Register pickle support functions
      • shelve — Python object persistence
      • marshal — Internal Python object serialization
      • dbm — Interfaces to Unix “databases”
      • sqlite3 — DB-API 2.0 interface for SQLite databases
    • Data Compression and Archiving
      • zlib — Compression compatible with gzip
      • gzip — Support for gzip files
      • bz2 — Support for bzip2 compression
      • lzma — Compression using the LZMA algorithm
      • zipfile — Work with ZIP archives
      • tarfile — Read and write tar archive files
    • File Formats
      • csv — CSV File Reading and Writing
      • configparser — Configuration file parser
      • tomllib — Parse TOML files
      • netrc — netrc file processing
      • plistlib — Generate and parse Apple .plist files
    • Cryptographic Services
      • hashlib — Secure hashes and message digests
      • hmac — Keyed-Hashing for Message Authentication
      • secrets — Generate secure random numbers for managing secrets
    • Generic Operating System Services
      • os — Miscellaneous operating system interfaces
      • io — Core tools for working with streams
      • time — Time access and conversions
      • argparse — Parser for command-line options, arguments and sub-commands
      • logging — Logging facility for Python
      • logging.config — Logging configuration
      • logging.handlers — Logging handlers
      • getpass — Portable password input
      • curses — Terminal handling for character-cell displays
      • curses.textpad — Text input widget for curses programs
      • curses.ascii — Utilities for ASCII characters
      • curses.panel — A panel stack extension for curses
      • platform — Access to underlying platform’s identifying data
      • errno — Standard errno system symbols
      • ctypes — A foreign function library for Python
    • Concurrent Execution
      • threading — Thread-based parallelism
      • multiprocessing — Process-based parallelism
      • multiprocessing.shared_memory — Shared memory for direct access across processes
      • The concurrent package
      • concurrent.futures — Launching parallel tasks
      • subprocess — Subprocess management
      • sched — Event scheduler
      • queue — A synchronized queue class
      • contextvars — Context Variables
      • _thread — Low-level threading API
    • Networking and Interprocess Communication
      • asyncio — Asynchronous I/O
        • Runners
        • Coroutines and Tasks
        • Streams
        • Synchronization Primitives
        • Subprocesses
        • Queues
        • Exceptions
        • Event Loop
        • Futures
        • Transports and Protocols
        • Policies
        • Platform Support
        • Extending
        • High-level API Index
        • Low-level API Index
        • Developing with asyncio
      • socket — Low-level networking interface
      • ssl — TLS/SSL wrapper for socket objects
      • select — Waiting for I/O completion
      • selectors — High-level I/O multiplexing
      • signal — Set handlers for asynchronous events
      • mmap — Memory-mapped file support
    • Internet Data Handling
      • email — An email and MIME handling package
        • email.message: Representing an email message
        • email.parser: Parsing email messages
        • email.generator: Generating MIME documents
        • email.policy: Policy Objects
        • email.errors: Exception and Defect classes
        • email.headerregistry: Custom Header Objects
        • email.contentmanager: Managing MIME Content
        • email: Examples
        • email.message.Message: Representing an email message using the compat32 API
        • email.mime: Creating email and MIME objects from scratch
        • email.header: Internationalized headers
        • email.charset: Representing character sets
        • email.encoders: Encoders
        • email.utils: Miscellaneous utilities
        • email.iterators: Iterators
      • json — JSON encoder and decoder
      • mailbox — Manipulate mailboxes in various formats
      • mimetypes — Map filenames to MIME types
      • base64 — Base16, Base32, Base64, Base85 Data Encodings
      • binascii — Convert between binary and ASCII
      • quopri — Encode and decode MIME quoted-printable data
    • Structured Markup Processing Tools
      • html — HyperText Markup Language support
      • html.parser — Simple HTML and XHTML parser
      • html.entities — Definitions of HTML general entities
      • XML Processing Modules
      • xml.etree.ElementTree — The ElementTree XML API
      • xml.dom — The Document Object Model API
      • xml.dom.minidom — Minimal DOM implementation
      • xml.dom.pulldom — Support for building partial DOM trees
      • xml.sax — Support for SAX2 parsers
      • xml.sax.handler — Base classes for SAX handlers
      • xml.sax.saxutils — SAX Utilities
      • xml.sax.xmlreader — Interface for XML parsers
      • xml.parsers.expat — Fast XML parsing using Expat
    • Internet Protocols and Support
      • webbrowser — Convenient web-browser controller
      • wsgiref — WSGI Utilities and Reference Implementation
      • urllib — URL handling modules
      • urllib.request — Extensible library for opening URLs
      • urllib.response — Response classes used by urllib
      • urllib.parse — Parse URLs into components
      • urllib.error — Exception classes raised by urllib.request
      • urllib.robotparser — Parser for robots.txt
      • http — HTTP modules
      • http.client — HTTP protocol client
      • ftplib — FTP protocol client
      • poplib — POP3 protocol client
      • imaplib — IMAP4 protocol client
      • smtplib — SMTP protocol client
      • uuid — UUID objects according to RFC 4122
      • socketserver — A framework for network servers
      • http.server — HTTP servers
      • http.cookies — HTTP state management
      • http.cookiejar — Cookie handling for HTTP clients
      • xmlrpc — XMLRPC server and client modules
      • xmlrpc.client — XML-RPC client access
      • xmlrpc.server — Basic XML-RPC servers
      • ipaddress — IPv4/IPv6 manipulation library
    • Multimedia Services
      • wave — Read and write WAV files
      • colorsys — Conversions between color systems
    • Internationalization
      • gettext — Multilingual internationalization services
      • locale — Internationalization services
    • Program Frameworks
      • turtle — Turtle graphics
      • cmd — Support for line-oriented command interpreters
      • shlex — Simple lexical analysis
    • Graphical User Interfaces with Tk
      • tkinter — Python interface to Tcl/Tk
      • tkinter.colorchooser — Color choosing dialog
      • tkinter.font — Tkinter font wrapper
      • Tkinter Dialogs
      • tkinter.messagebox — Tkinter message prompts
      • tkinter.scrolledtext — Scrolled Text Widget
      • tkinter.dnd — Drag and drop support
      • tkinter.ttk — Tk themed widgets
      • IDLE
    • Development Tools
      • typing — Support for type hints
      • pydoc — Documentation generator and online help system
      • Python Development Mode
      • doctest — Test interactive Python examples
      • unittest — Unit testing framework
      • unittest.mock — mock object library
      • unittest.mock — getting started
      • test — Regression tests package for Python
      • test.support — Utilities for the Python test suite
      • test.support.socket_helper — Utilities for socket tests
      • test.support.script_helper — Utilities for the Python execution tests
      • test.support.bytecode_helper — Support tools for testing correct bytecode generation
      • test.support.threading_helper — Utilities for threading tests
      • test.support.os_helper — Utilities for os tests
      • test.support.import_helper — Utilities for import tests
      • test.support.warnings_helper — Utilities for warnings tests
    • Debugging and Profiling
      • Audit events table
      • bdb — Debugger framework
      • faulthandler — Dump the Python traceback
      • pdb — The Python Debugger
      • The Python Profilers
      • timeit — Measure execution time of small code snippets
      • trace — Trace or track Python statement execution
      • tracemalloc — Trace memory allocations
    • Software Packaging and Distribution
      • ensurepip — Bootstrapping the pip installer
      • venv — Creation of virtual environments
      • zipapp — Manage executable Python zip archives
    • Python Runtime Services
      • sys — System-specific parameters and functions
      • sys.monitoring — Execution event monitoring
      • sysconfig — Provide access to Python’s configuration information
      • builtins — Built-in objects
      • __main__ — Top-level code environment
      • warnings — Warning control
      • dataclasses — Data Classes
      • contextlib — Utilities for with-statement contexts
      • abc — Abstract Base Classes
      • atexit — Exit handlers
      • traceback — Print or retrieve a stack traceback
      • __future__ — Future statement definitions
      • gc — Garbage Collector interface
      • inspect — Inspect live objects
      • annotationlib — Functionality for introspecting annotations
      • site — Site-specific configuration hook
    • Custom Python Interpreters
      • code — Interpreter base classes
      • codeop — Compile Python code
    • Importing Modules
      • zipimport — Import modules from Zip archives
      • pkgutil — Package extension utility
      • modulefinder — Find modules used by a script
      • runpy — Locating and executing Python modules
      • importlib — The implementation of import
      • importlib.resources – Package resource reading, opening and access
      • importlib.resources.abc – Abstract base classes for resources
      • importlib.metadata – Accessing package metadata
      • The initialization of the sys.path module search path
    • Python Language Services
      • ast — Abstract Syntax Trees
      • symtable — Access to the compiler’s symbol tables
      • token — Constants used with Python parse trees
      • keyword — Testing for Python keywords
      • tokenize — Tokenizer for Python source
      • tabnanny — Detection of ambiguous indentation
      • pyclbr — Python module browser support
      • py_compile — Compile Python source files
      • compileall — Byte-compile Python libraries
      • dis — Disassembler for Python bytecode
      • pickletools — Tools for pickle developers
    • MS Windows Specific Services
      • msvcrt — Useful routines from the MS VC++ runtime
      • winreg — Windows registry access
      • winsound — Sound-playing interface for Windows
    • Unix Specific Services
      • posix — The most common POSIX system calls
      • pwd — The password database
      • grp — The group database
      • termios — POSIX style tty control
      • tty — Terminal control functions
      • pty — Pseudo-terminal utilities
      • fcntl — The fcntl and ioctl system calls
      • resource — Resource usage information
      • syslog — Unix syslog library routines
    • Modules command-line interface (CLI)
    • Superseded Modules
      • getopt — C-style parser for command line options
      • optparse — Parser for command line options
    • Security Considerations
  • Extending and Embedding the Python Interpreter
    • 1. Extending Python with C or C++
    • 2. Defining Extension Types: Tutorial
    • 3. Defining Extension Types: Assorted Topics
    • 4. Building C and C++ Extensions
    • 5. Building C and C++ Extensions on Windows
    • 1. Embedding Python in Another Application
  • Python/C API Reference Manual
    • Introduction
    • C API Stability
    • The Very High Level Layer
    • Reference Counting
    • Exception Handling
    • Utilities
      • Operating System Utilities
      • System Functions
      • Process Control
      • Importing Modules
      • Data marshalling support
      • Parsing arguments and building values
      • String conversion and formatting
      • PyHash API
      • Reflection
      • Codec registry and support functions
      • PyTime C API
      • Support for Perf Maps
    • Abstract Objects Layer
      • Object Protocol
      • Call Protocol
      • Number Protocol
      • Sequence Protocol
      • Mapping Protocol
      • Iterator Protocol
      • Buffer Protocol
    • Concrete Objects Layer
      • Type Objects
      • The None Object
      • Integer Objects
      • Boolean Objects
      • Floating-Point Objects
      • Complex Number Objects
      • Bytes Objects
      • Byte Array Objects
      • Unicode Objects and Codecs
      • Tuple Objects
      • Struct Sequence Objects
      • List Objects
      • Dictionary Objects
      • Set Objects
      • Function Objects
      • Instance Method Objects
      • Method Objects
      • Cell Objects
      • Code Objects
      • Extra information
      • File Objects
      • Module Objects
      • Iterator Objects
      • Descriptor Objects
      • Slice Objects
      • MemoryView objects
      • Weak Reference Objects
      • Capsules
      • Frame Objects
      • Generator Objects
      • Coroutine Objects
      • Context Variables Objects
      • DateTime Objects
      • Objects for Type Hinting
    • Initialization, Finalization, and Threads
    • Python Initialization Configuration
    • Memory Management
    • Object Implementation Support
      • Allocating Objects on the Heap
      • Common Object Structures
      • Type Objects
      • Number Object Structures
      • Mapping Object Structures
      • Sequence Object Structures
      • Buffer Object Structures
      • Async Object Structures
      • Slot Type typedefs
      • Examples
      • Supporting Cyclic Garbage Collection
    • API and ABI Versioning
    • Monitoring C API
    • Generating Execution Events
  • Installing Python Modules
  • Python HOWTOs
    • Porting Extension Modules to Python 3
    • Curses Programming with Python
    • Descriptor Guide
    • Debugging C API extensions and CPython Internals with GDB
    • Enum HOWTO
    • Functional Programming HOWTO
    • Logging HOWTO
    • Logging Cookbook
    • Regular Expression HOWTO
    • Socket Programming HOWTO
    • Sorting Techniques
    • Unicode HOWTO
    • HOWTO Fetch Internet Resources Using The urllib Package
    • Argparse Tutorial
    • An introduction to the ipaddress module
    • Instrumenting CPython with DTrace and SystemTap
    • Python support for the Linux perf profiler
    • Annotations Best Practices
    • Isolating Extension Modules
    • timer file descriptor HOWTO
    • The Python 2.3 Method Resolution Order
    • Python experimental support for free threading
    • C API Extension Support for Free Threading
  • Python Frequently Asked Questions
    • General Python FAQ
    • Programming FAQ
    • Design and History FAQ
    • Library and Extension FAQ
    • Extending/Embedding FAQ
    • Python on Windows FAQ
    • Graphic User Interface FAQ
    • “Why is Python Installed on my Computer?” FAQ
  • Deprecations
  • Glossary
  • About these documents
  • Dealing with Bugs
  • Copyright
  • History and License
You are using relations.html in html_sidebars. This configuration does not work with Shibuya, which is why you're seeing this message. Please see documentation on sidebar customisation in Shibuya for more details.

This Page

  • Report a Bug
  • Show Source
  1. Python /
  2. The Python Standard Library /
  3. Software Packaging and Distribution

Software Packaging and Distribution¶

These libraries help you with publishing and installing Python software. While these modules are designed to work in conjunction with the Python Package Index, they can also be used with a local index server, or without any index server at all.

  • ensurepip — Bootstrapping the pip installer
  • venv — Creation of virtual environments
  • zipapp — Manage executable Python zip archives
Previous
tracemalloc — Trace memory allocations
Next
ensurepip — Bootstrapping the pip installer

2001-2024, Python Software Foundation

Made with Sphinx and Shibuya theme.