La Biblioteca Estándar de Python


 La Biblioteca Estándar de Python
 Mientras que The Python Language Reference describe la sintaxis y la semántica exactas del lenguaje Python, este manual de referencia de la biblioteca describe la biblioteca estándar que se distribuye con Python. También describe algunos de los componentes opcionales que se incluyen comúnmente en las distribuciones de Python.
La biblioteca estándar de Python es muy extensa, ofreciendo un amplio rango de facilidades como se indica en la larga tabla de contenidos que aparece a continuación. La librería contiene módulos incorporados (escritos en C) que proporcionan acceso a la funcionalidad del sistema, como ficheros de E/S que de otra forma serían inaccesibles para los programadores de Python, así como módulos escritos en Python que proporcionan soluciones estandarizadas para muchos problemas que ocurren en la programación diaria. Algunos de estos módulos están explícitamente diseñados para fomentar y mejorar la portabilidad de los programas en Python, abstrayendo los específicos de la plataforma en APIs de plataforma neutral.
Los instaladores de Python para la plataforma Windows suelen incluir toda la biblioteca estándar y a menudo también incluyen muchos componentes adicionales. Para los sistemas operativos tipo Unix, Python se proporciona normalmente como una colección de paquetes, por lo que puede ser necesario utilizar las herramientas de empaquetado proporcionadas con el sistema operativo para obtener algunos o todos los componentes opcionales.
Además de la biblioteca estándar, hay una creciente colección de varios miles de componentes (desde programas y módulos individuales hasta paquetes y marcos de desarrollo de aplicaciones completos), disponibles en el Índice de Paquetes Python.

  • Introduction (Introducción)
    • Notes on availability (Notas sobre la disponibilidad)
  • Built-in Functions (Funciones incorporadas)
  • Built-in Constants (Constantes incorporadas)
    • Constants added by the site module (Constantes añadidas por el módulo del sitio)
  • Built-in Types (Tipos incorporados)
    • Truth Value Testing (Prueba de valor de la verdad)
    • Boolean Operations — and, or, not (Operaciones booleanas - y, o, no)
    • Comparisons (Comparaciones)
    • Numeric Types — int, float, complex (Tipos numéricos - int, float, complex)
    • Iterator Types (Tipo de iteradores)
    • Sequence Types — list, tuple, range (Tipos de secuencia - lista, tupla, rango)
    • Text Sequence Type — str (Tipo de secuencia de texto - str)
    • Binary Sequence Types — bytes, bytearray, memoryview (Tipos de secuencia binaria - bytes, matriz de bytes, vista de memoria)
    • Set Types — set, frozenset (Tipos de set - set, set congelado)
    • Mapping Types — dict (Tipos de mapas - dict)
    • Context Manager Types (Tipos de Gestor de Contexto)
    • Other Built-in Types (Otros tipos incorporados)
    • Special Attributes (Atributos especiales)
  • Built-in Exceptions (Excepciones incorporadas)
    • Base classes (Clases de base)
    • Concrete exceptions (Excepciones concretas)
    • Warnings (Advertencias)
    • Exception hierarchy (Jerarquía de excepciones)
  • Text Processing Services (Servicios de procesamiento de textos)
    • string — Common string operations (Operaciones comunes de string)
    • re — Regular expression operations (Operaciones de expresión regular)
    • difflib — Helpers for computing deltas (Ayudas para el cálculo de los deltas)
    • textwrap — Text wrapping and filling (Envoltura y relleno de texto)
    • unicodedata — Unicode Database (Base de datos Unicode)
    • stringprep — Internet String Preparation (Preparación de cadenas de Internet)
    • readline — GNU readline interface (Interfaz de línea de lectura de GNU)
    • rlcompleter — Completion function for GNU readline (Función de finalización para la línea de lectura de GNU)
  • Binary Data Services (Servicios de datos binarios)
    • struct — Interpret bytes as packed binary data
    • codecs — Codec registry and base classes
  • Data Types (Tipos de datos)
    • datetime — Basic date and time types (Tipos básicos de fecha y hora)
    • calendar — General calendar-related functions (Funciones generales relacionadas con el calendario)
    • collections — Container datatypes (Tipos de datos de contenedor)
    • collections.abc — Abstract Base Classes for Containers (Clases base abstractas para contenedores)
    • heapq — Heap queue algorithm (Algoritmo de cola de espera)
    • bisect — Array bisection algorithm (Algoritmo de bisección de matrices)
    • array — Efficient arrays of numeric values (Matrices eficientes de valores numéricos)
    • weakref — Weak references (Referencias débiles)
    • types — Dynamic type creation and names for built-in types
    • copy — Shallow and deep copy operations
    • pprint — Data pretty printer (Impresora bonita de datos)
    • reprlib — Alternate repr() implementation (Implementación alternativa de repr ())
    • enum — Support for enumerations (Soporte para enumeraciones)
  • Numeric and Mathematical Modules (Módulos numéricos y matemáticos)
    • numbers — Numeric abstract base classes (Clases base abstractas numéricas)
    • math — Mathematical functions (Funciones matematicas)
    • cmath — Mathematical functions for complex numbers (Funciones matemáticas para números complejos.)
    • decimal — Decimal fixed point and floating point arithmetic (Punto fijo decimal y aritmética de coma flotante)
    • fractions — Rational numbers (Numeros racionales)
    • random — Generate pseudo-random numbers (Generar números pseudoaleatorios)
    • statistics — Mathematical statistics functions (Funciones de estadística matemática)
  • Functional Programming Modules (Módulos de programación funcional)
    • itertools — Functions creating iterators for efficient looping (Funciones que crean iteradores para un bucle eficiente)
    • functools — Higher-order functions and operations on callable objects (Funciones y operaciones de orden superior en objetos invocables)
    • operator — Standard operators as functions (Operadores estándar como funciones)
  • File and Directory Access (Acceso a Archivos y Directorios)
    • pathlib — Object-oriented filesystem paths (Rutas de sistema de archivos orientadas a objetos)
    • os.path — Common pathname manipulations (Manipulaciones comunes de nombres de ruta)
    • fileinput — Iterate over lines from multiple input streams (Iterar sobre líneas de múltiples flujos de entrada)
    • stat — Interpreting stat() results (Interpretación de los resultados de stat ())
    • filecmp — File and Directory Comparisons (Comparaciones de archivos y directorios)
    • tempfile — Generate temporary files and directories (Generar archivos y directorios temporales)
    • glob — Unix style pathname pattern expansion (Expansión de patrón de nombre de ruta de estilo Unix)
    • fnmatch — Unix filename pattern matching (Unix coincidencia de patrones de nombre de archivo)
    • linecache — Random access to text lines (Acceso aleatorio a líneas de texto)
    • shutil — High-level file operations
    • macpath — Mac OS 9 path manipulation functions
  • Data Persistence (Persistencia de los datos)
    • 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 (Compresión y archivo de datos)
    • zlib — Compression compatible with gzip (Compresión compatible con gzip)
    • gzip — Support for gzip files (Soporte para archivos gzip)
    • bz2 — Support for bzip2 compression (Soporte para compresión bzip2)
    • lzma — Compression using the LZMA algorithm (Compresión usando el algoritmo LZMA)
    • zipfile — Work with ZIP archives (Trabajar con archivos ZIP)
    • tarfile — Read and write tar archive files (Leer y escribir archivos tar)
  • File Formats (Formatos de archivo)
    • csv — CSV File Reading and Writing (Lectura y escritura de archivos CSV)
    • configparser — (Analizador de archivos de configuración)
    • netrc — netrc file processing (procesamiento de archivos netrc)
    • xdrlib — Encode and decode XDR data (Codificar y decodificar datos XDR)
    • plistlib — Generate and parse Mac OS X .plist files
  • Cryptographic Services
    • hashlib — Secure hashes and message digests (Asegure hashes y resúmenes de mensajes)
    • hmac — Keyed-Hashing for Message Authentication
    • secrets — Generate secure random numbers for managing secrets (Genere números aleatorios seguros para administrar secretos)
  • Generic Operating System Services (Servicios de sistema operativo genérico)
    • os — Miscellaneous operating system interfaces (Interfaces diversas del sistema operativo)
    • io — Core tools for working with streams (Herramientas básicas para trabajar con flujos)
    • time — Time access and conversions (Tiempo de acceso y conversiones)
    • argparse — Parser for command-line options, arguments and sub-commands
    • getopt — C-style parser for command line options (Analizador de estilo C para opciones de línea de comando)
    • logging — Logging facility for Python (Instalación de registro para Python)
    • logging.config — Logging configuration (Configuración de registro)
    • logging.handlers — Logging handlers (Controladores de registro)
    • getpass — Portable password input (Entrada de contraseña portátil)
    • curses — Terminal handling for character-cell displays (Manejo de terminales para pantallas de celdas de caracteres)
    • curses.textpad — Text input widget for curses programs (Widget de entrada de texto para programas de maldiciones)
    • curses.ascii — Utilities for ASCII characters (Utilidades para caracteres ASCII)
    • curses.panel — A panel stack extension for curses (Una extensión de pila de paneles para maldiciones)
    • platform — Access to underlying platform’s identifying data (Acceso a los datos de identificación de la plataforma subyacente.)
    • errno — Standard errno system symbols (Símbolos del sistema errno estándar)
    • ctypes — A foreign function library for Python (Una biblioteca de funciones foráneas para Python)
  • Concurrent Execution (Ejecución concurrente)
    • threading — Thread-based parallelism (Paralelismo basado en hilos)
    • multiprocessing — Process-based parallelism (Paralelismo basado en procesos)
    • The concurrent package (El paquete concurrente)
    • concurrent.futures — Launching parallel tasks (Lanzar tareas paralelas)
    • subprocess — Subprocess management (Gestión de subprocesos)
    • sched — Event scheduler (Planificador de eventos)
    • queue — A synchronized queue class (Una clase de cola sincronizada)
    • _thread — Low-level threading API
    • _dummy_thread — Drop-in replacement for the _thread module
    • dummy_threading — Drop-in replacement for the threading module
  • contextvars — Context Variables (Variables de contexto)
    • Context Variables (Variables de contexto)
    • Manual Context Management (Gestión manual de contexto)
    • asyncio support (apoyo asincrónico)
  • Networking and Interprocess Communication (Redes y comunicación entre procesos)
    • asyncio — Asynchronous I/O
    • socket — Low-level networking interface
    • ssl — TLS/SSL wrapper for socket objects
    • select — Waiting for I/O completion
    • selectors — High-level I/O multiplexing
    • asyncore — Asynchronous socket handler
    • asynchat — Asynchronous socket command/response handler
    • signal — Set handlers for asynchronous events
    • mmap — Memory-mapped file support
  • Internet Data Handling
    • email — An email and MIME handling package
    • json — JSON encoder and decoder
    • mailcap — Mailcap file handling
    • mailbox — Manipulate mailboxes in various formats
    • mimetypes — Map filenames to MIME types
    • base64 — Base16, Base32, Base64, Base85 Data Encodings
    • binhex — Encode and decode binhex4 files
    • binascii — Convert between binary and ASCII
    • quopri — Encode and decode MIME quoted-printable data
    • uu — Encode and decode uuencode files
  • 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
    • cgi — Common Gateway Interface support
    • cgitb — Traceback manager for CGI scripts
    • 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
    • nntplib — NNTP protocol client
    • smtplib — SMTP protocol client
    • smtpd — SMTP Server
    • telnetlib — Telnet 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 (Manejo de cookies para clientes HTTP)
    • xmlrpc — XMLRPC server and client modules (Servidor XMLRPC y módulos de cliente)
    • xmlrpc.client — XML-RPC client access (Acceso de cliente XML-RPC)
    • xmlrpc.server — Basic XML-RPC servers (Servidores básicos de XML-RPC)
    • ipaddress — IPv4/IPv6 manipulation library (Biblioteca de manipulación de IPv4 / IPv6)
  • Multimedia Services (Servicios multimedia)
    • audioop — Manipulate raw audio data (Manipular datos de audio sin procesar)
    • aifc — Read and write AIFF and AIFC files (Leer y escribir archivos AIFF y AIFC)
    • sunau — Read and write Sun AU files (Leer y escribir archivos Sun AU)
    • wave — Read and write WAV files (Leer y escribir archivos WAV)
    • chunk — Read IFF chunked data (Leer datos fragmentados de IFF)
    • colorsys — Conversions between color systems (Conversiones entre sistemas de color)
    • imghdr — Determine the type of an image (Determinar el tipo de imagen)
    • sndhdr — Determine type of sound file (Determinar el tipo de archivo de sonido)
    • ossaudiodev — Access to OSS-compatible audio devices (Acceso a dispositivos de audio compatibles con OSS)
  • Internationalization (Internacionalizacion)
    • gettext — Multilingual internationalization services (Servicios de internacionalización multilingües)
    • locale — Internationalization services (Servicios de internacionalización)
  • Program Frameworks (Marcos de programa)
    • turtle — Turtle graphics (Gráficos de tortuga)
    • cmd — Support for line-oriented command interpreters
    • shlex — Simple lexical analysis
  • Graphical User Interfaces with Tk
    • tkinter — Python interface to Tcl/Tk
    • tkinter.ttk — Tk themed widgets
    • tkinter.tix — Extension widgets for Tk
    • tkinter.scrolledtext — Scrolled Text Widget
    • IDLE
    • Other Graphical User Interface Packages (Otros paquetes de interfaz gráfica de usuario)
  • Development Tools (Herramientas de desarrollo)
    • typing — Support for type hints (Soporte para sugerencias de tipo)
    • pydoc — Documentation generator and online help system (Generador de documentación y sistema de ayuda en línea)
    • doctest — Test interactive Python examples (Prueba ejemplos interactivos de Python)
    • unittest — Unit testing framework (Marco de pruebas unitarias)
    • unittest.mock — mock object library (biblioteca de objetos simulados)
    • unittest.mock — getting started
    • 2to3 - Automated Python 2 to 3 code translation
    • test — Regression tests package for Python
    • test.support — Utilities for the Python test suite
    • test.support.script_helper — Utilities for the Python execution tests
  • Debugging and Profiling
    • 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
    • distutils — Building and installing Python modules
    • 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
    • sysconfig — Provide access to Python’s configuration information
    • builtins — Built-in objects
    • __main__ — Top-level script 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
    • 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
  • Python Language Services
    • parser — Access Python parse trees
    • ast — Abstract Syntax Trees
    • symtable — Access to the compiler’s symbol tables
    • symbol — Constants used with Python parse trees
    • token — Constants used with Python parse trees
    • keyword — Testing for Python keywords
    • tokenize — Tokenizer for Python source
    • tabnanny — Detection of ambiguous indentation
    • pyclbr — Python class browser support
    • py_compile — Compile Python source files
    • compileall — Byte-compile Python libraries
    • dis — Disassembler for Python bytecode
    • pickletools — Tools for pickle developers
  • Miscellaneous Services
    • formatter — Generic output formatting
  • MS Windows Specific Services
    • msilib — Read and write Microsoft Installer files
    • 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
    • spwd — The shadow password database
    • grp — The group database
    • crypt — Function to check Unix passwords
    • termios — POSIX style tty control
    • tty — Terminal control functions
    • pty — Pseudo-terminal utilities
    • fcntl — The fcntl and ioctl system calls
    • pipes — Interface to shell pipelines
    • resource — Resource usage information
    • nis — Interface to Sun’s NIS (Yellow Pages)
    • syslog — Unix syslog library routines
  • Superseded Modules
    • optparse — Parser for command line options
    • imp — Access the import internals
  • Undocumented Modules
    • Platform specific modules

RETURN


No hay comentarios.:

Publicar un comentario

INDICE