Code block
/code
Try me!
Python
A code editor block powered by CodeMirror. It's configured to have all default VSCode keybinds built-in by default.
The editor also supports running Python, JavaScript, and Tikz code directly inside of it. It also supports a variety of common Python libraries, such as matplotlib
, pandas
, scikit-learn
, and more.
Learn (some of) the shortcuts:
-
With no text selected, copy current line.
-
With no text selected, cut current line.
-
Paste selected content. Supports pasting copied lines.
-
Swap current line with line directly above.
-
Swap current line with line directly below.
-
Swap current column with the column directly right of it.
-
Swap current column with the column directly left of it.
-
Create copy of current line directly above.
-
Create copy of current line directly below.
Supported packages:
aiohttp
: Asynchronous HTTP client/server frameworkaiosignal
: Managed signals implementation on top of asyncioaltair
: Declarative statistical visualization libraryannotated-types
: Typing annotations for runtime type checkingasciitree
: ASCII trees for Pythonastropy
: Astronomy and astrophysics core libraryastropy_iers_data
: IERS data for Astropyasttokens
: Annotate AST trees with source code positionsasync-timeout
: Timeout context manager for asyncio programsatomicwrites
: Atomic file writesattrs
: Classes without boilerplateautograd
: Efficiently computes derivatives of numpy codeawkward-cpp
: CPU kernels for Awkward Arrayb2d
: Box2D physics engine Python wrapperbcrypt
: Modern password hashing librarybeautifulsoup4
: Screen-scraping librarybiopython
: Tools for computational molecular biologybitarray
: Efficient array of booleansbitstring
: Simple construction, analysis, and modification of binary datableach
: HTML sanitizing librarybokeh
: Interactive visualization libraryboost-histogram
: Python bindings for the C++ Boost::Histogram librarybrotli
: Brotli compression algorithmcachetools
: Extensible memoizing collections and decoratorsCartopy
: Cartographic tools for Pythoncbor-diag
: CBOR diagnostic notation toolscertifi
: Collection of root certificates for SSL/TLS verificationcffi
: Foreign Function Interface for Python calling C codecffi_example
: Example package for CFFIcftime
: Time-handling functionality from netcdf4-pythoncharset-normalizer
: The Real First Universal Charset Detectorclarabel
: Interior point solver for convex optimization problemsclick
: Composable command line interface toolkitcligj
: Click params for commmand line GIS applicationscloudpickle
: Extended pickling support for Python objectscmyt
: Colormaps for YTcolorspacious
: Powerful, accurate, and easy-to-use Python library for doing colorspace conversionscontourpy
: Python library for calculating contours of 2D quadrilateral gridscoolprop
: Thermophysical properties for the massescoverage
: Code coverage measurement for Pythoncramjam
: Thin Python bindings to de/compression algorithms in Rustcrc32c
: Python wrapper for CRC32C algorithmcryptography
: Cryptographic recipes and primitivescssselect
: CSS Selectors for Pythoncvxpy-base
: A Python-embedded modeling language for convex optimization problemscycler
: Composable style cyclescysignals
: Interrupt and signal handling for Cythoncytoolz
: Cython implementation of Toolzdecorator
: Decorators for Humansdemes
: A Python API for demes datadeprecation
: A library to handle automated deprecationsdistlib
: Distribution utilitiesdocutils
: Docutils -- Python Documentation Utilitiesduckdb
: DuckDB embedded databaseewah_bool_utils
: Bit array compression using the Enhanced Word Aligned Hybrid (EWAH) schemeexceptiongroup
: Backport of PEP 654 (exception groups)executing
: Get the currently executing AST node of a frame, and other informationfastparquet
: Python support for Parquet file formatfiona
: Fiona reads and writes spatial data filesfonttools
: Tools to manipulate font filesfreesasa
: Calculate solvent accessible surface areas of proteinsfrozenlist
: A list-like structure which implements collections.abc.MutableSequencefsspec
: File-system specificationfuture
: Clean single-source support for Python 3 and 2galpy
: Galactic Dynamics in Pythongensim
: Topic modelling, document indexing and similarity retrieval with large corporageopandas
: Geographic pandas extensionsgmpy2
: GMP/MPIR, MPFR, and MPC interface to Python 2.6+ and 3.xgsw
: Gibbs SeaWater Oceanographic Package of TEOS-10h5py
: Read and write HDF5 files from Pythonhtml5lib
: HTML parser based on the WHATWG HTML specificationidna
: Internationalized Domain Names in Applications (IDNA)igraph
: High performance graph data structures and algorithmsimageio
: Library for reading and writing a wide range of image, video, scientific, and volumetric data formatsiniconfig
: Brain-dead simple config-ini parsingipython
: IPython: Productive Interactive Computingjedi
: An autocompletion tool for Python that can be used for text editorsJinja2
: A very fast and expressive template enginejoblib
: Lightweight pipelining: using Python functions as pipeline jobsjsonschema
: An implementation of JSON Schema validation for Pythonjsonschema_specifications
: The JSON Schema meta-schemas and vocabularies, exposed as a Registrykiwisolver
: A fast implementation of the Cassowary constraint solverlakers-python
: Python bindings for the LAKERS librarylazy-object-proxy
: A fast and thorough lazy object proxylazy_loader
: lazy_loaderlibcst
: A concrete syntax tree with AST-like properties for Python 3.5, 3.6, 3.7, 3.8, 3.9, and 3.10 programslightgbm
: LightGBM Python Packagelogbook
: A logging replacement for Pythonlxml
: Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree APIMarkupSafe
: Safely add untrusted strings to HTML/XML markupmatplotlib
: Python plotting packagematplotlib-inline
: Inline Matplotlib backend for Jupytermatplotlib-pyodide
: Matplotlib for Pyodidememory-allocator
: A Python memory allocator for experimentationmicropip
: A lightweight Python package installer for the web browsermmh3
: Python wrapper for MurmurHash (MurmurHash3), a set of fast and robust hash functionsmne
: MNE: Magnetoencephalography (MEG) and Electroencephalography (EEG) in Pythonmore-itertools
: More routines for operating on iterables, beyond itertoolsmpmath
: Python library for arbitrary-precision floating-point arithmeticmsgpack
: MessagePack (de)serializermsgspec
: A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOMLmsprime
: A fast and accurate coalescent simulatormultidict
: multidict implementationmunch
: A dot-accessible dictionary (a la JavaScript objects)mypy
: Optional static typing for Pythonnetcdf4
: Provides an object-oriented python interface to the netCDF version 4 librarynetworkx
: Python package for creating and manipulating graphs and networksnewick
: A python module to read and write the Newick formatnh3
: Ammonia: Python refactoring librarynlopt
: Library for nonlinear optimization, wrapping many algorithms for global and local, constrained or unconstrained, optimizationnltk
: Natural Language Toolkitnumcodecs
: A Python package providing buffer compression and transformation codecs for use in data storage and communication applicationsnumpy
: Fundamental package for array computing in Pythonopencv-python
: Wrapper package for OpenCV python bindingsoptlang
: Sympy based mathematical programming languageorjson
: Fast, correct Python JSON library supporting dataclasses, datetimes, and numpypackaging
: Core utilities for Python packagespandas
: Powerful data structures for data analysis, time series, and statisticsparso
: A Python Parserpatsy
: A Python package for describing statistical models and for building design matricespeewee
: A small, expressive ORMPillow
: Python Imaging Library (Fork)pillow_heif
: Python Pillow High Efficiency Image Format (HEIF) pluginpkgconfig
: Interface Python with pkg-configpluggy
: Plugin and hook calling mechanisms for pythonpplpy
: Python interface to the Parma Polyhedra Libraryprimecountpy
: Python bindings for Kim Walisch's primecount libraryprompt_toolkit
: Library for building powerful interactive command lines in Pythonprotobuf
: Protocol Bufferspure_eval
: Safely evaluate AST nodes without side effectspy
: Library with cross-python path, ini-parsing, io, code, log facilitiespyclipper
: Cython wrapper for the C++ translation of the Angus Johnson's Clipper librarypycparser
: C parser in Pythonpycryptodome
: Cryptographic library for Pythonpydantic
: Data validation and settings management using Python type hintspydantic_core
: Core functionality for pydanticpyerfa
: Python bindings for ERFApygame-ce
: Python Game DevelopmentPygments
: Syntax highlighting package written in Pythonpyheif
: Python 3 bindings for libheif librarypyiceberg
: Python implementation of the Apache Iceberg table formatpyinstrument
: Call stack profiler for Python. Shows you why your code is slow!pynacl
: Python binding to the Networking and Cryptography (NaCl) librarypyodide-http
: A fork of the Python 'http' package for use with Pyodidepyparsing
: Python parsing modulepyproj
: Python interface to PROJ (cartographic projections and coordinate transformations library)pyrsistent
: Persistent/Functional/Immutable data structurespysam
: Python module for reading and manipulating SAM/BAM/VCF/BCF filespyshp
: Pure Python read/write support for ESRI Shapefile formatpytest
: pytest: simple powerful testing with Pythonpytest-asyncio
: Pytest support for asynciopytest-benchmark
: A pytest fixture for benchmarking codepython-dateutil
: Extensions to the standard Python datetime modulepython-flint
: Python bindings for FLINT and Arbpython-magic
: File type identification using libmagicpython-sat
: A Python library for prototyping with SAT oraclespython_solvespace
: Python library for SolveSpace CAD softwarepytz
: World timezone definitions, modern and historicalpywavelets
: PyWavelets, wavelet transform modulepyxel
: A retro game engine for Pythonpyxirr
: Calculates xirr on irregular cashflowspyyaml
: YAML parser and emitter for Pythonrebound
: An open-source multi-purpose N-body codereboundx
: A library for including additional forces in REBOUNDreferencing
: JSON Referencing + Pythonregex
: Alternative regular expression module, to replace rerequests
: Python HTTP for Humansretrying
: Retryingrich
: Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminalriver
: Online machine learning in PythonRobotRaconteur
: Robot Raconteur: A communication framework for robotics, automation, and the Internet of Thingsrpds-py
: Python bindings to Rust's persistent data structuresruamel.yaml
: ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key orderrust-panic-test
: Test package for Rust panic handlingscikit-image
: Image processing in Pythonscikit-learn
: A set of python modules for machine learning and data miningscipy
: SciPy: Scientific Library for Pythonscreed
: A short read databasesetuptools
: Easily download, build, install, upgrade, and uninstall Python packagesshapely
: Geometric objects, predicates, and operationssimplejson
: Simple, fast, extensible JSON encoder/decoder for Pythonsisl
: Siesta Input/Output Librarysix
: Python 2 and 3 compatibility utilitiessmart_open
: Utils for streaming large files (S3, HDFS, GCS, Azure Blob Storage, gzip, bz2...)sortedcontainers
: Sorted Containers -- Sorted List, Sorted Dict, Sorted Setsoupsieve
: A modern CSS selector implementation for Beautiful Soupsourmash
: Compute and compare MinHash signatures for DNA sequencessparseqr
: Sparse QR Decompositionsqlalchemy
: Database Abstraction Librarystack_data
: Extract data from python stack frames and tracebacks for informative displaysstatsmodels
: Statistical computations and models for Pythonstrictyaml
: Type-safe YAML parser and validatorsvgwrite
: A Python library to create SVG drawingsswiglpk
: Swig-generated Python interface to GLPK (GNU Linear Programming Kit)sympy
: Computer algebra system (CAS) in Pythontblib
: Traceback serialization librarytermcolor
: ANSI color formatting for output in terminaltexttable
: Module for creating simple ASCII tablesthreadpoolctl
: ThreadPool Controltomli
: A lil' TOML parsertomli-w
: A lil' TOML writertoolz
: List processing tools and functional utilitiestqdm
: Fast, Extensible Progress Metertraitlets
: Traitlets Python configuration systemtraits
: Observable typed attributes for Python classestskit
: The tree sequence toolkittyping-extensions
: Backported and Experimental Type Hints for Python 3.5+tzdata
: Provider of IANA time zone datauncertainties
: Transparent calculations with uncertainties on the quantities involvedunyt
: A package for handling numpy arrays with unitsurllib3
: HTTP library with thread-safe connection pooling, file post, and morewcwidth
: Measures the displayed width of unicode strings in a terminalwebencodings
: Character encoding aliases for legacy web contentwordcloud
: A little word cloud generatorwrapt
: Module for decorators, wrappers and monkey patchingxarray
: N-D labeled arrays and datasets in Pythonxgboost
: Gradient boosting libraryxlrd
: Library for developers to extract data from Microsoft Excel (tm) spreadsheet filesxxhash
: Python binding for xxHashxyzservices
: Source of XYZ tiles providersyarl
: Yet another URL libraryyt
: An analysis and visualization toolkit for volumetric datazarr
: An implementation of chunked, compressed, N-dimensional arrays for Pythonzengl
: A Python library for portable graphics developmentzstandard
: Zstandard bindings for Python
Learn more
Get a full list of supported Python packages by visiting the Pyodide documentation.