Python Package Examples

Explore runnable examples for popular Python packages — open any example and run it instantly in your browser.

Altair

Run Altair code in your browser. Make bar, line and scatter charts and histograms from pandas data, with tooltips and selections.

View example →

Biopython

Run Biopython code in your browser. Reverse-complement and translate DNA, parse FASTA and score pairwise alignments.

View example →

Bokeh

Make Bokeh plots in your browser. Scatter, line and bar charts, hover tooltips, linked layouts and standalone HTML files.

View example →

Bokeh App

Run Bokeh app code in your browser. Connect sliders, dropdowns and buttons to Python callbacks that update plots and tables.

View example →

Dask

Split pandas and NumPy work into chunks with Dask in your browser: lazy DataFrames, many CSV files at once, chunked arrays and delayed functions.

View example →

python-docx

Turn Python code into Word (.docx) documents in your browser, with headings, formatted text, tables and pictures.

View example →

DuckDB

Run DuckDB SQL queries in your browser. Query CSV files and pandas DataFrames, join tables, save a database and export to Parquet.

View example →

Faker

Generate fake names, emails, addresses and dates in your browser, with seeds, locales, pandas DataFrames and custom values.

View example →

Files

Read and write files with Python in your browser: write and read text, append lines, save CSV and JSON, and list or delete files.

View example →

Folium

Make web maps in your browser, with markers and popups, lines and circles, GeoJSON layers, choropleths and heat maps.

View example →

GeoPandas

Run GeoPandas code in your browser. Read shapefiles, build points from coordinates, reproject, join by location and map.

View example →

getpass

Run getpass code in your browser. Ask for a password or API key, confirm a new password and get the user name.

View example →

HoloViews + Panel

Build dashboards with HoloViews and Panel in your browser: dropdowns that pick what to plot, sliders that filter points and auto-made widgets.

View example →

igraph

Run igraph code in your browser. Build graphs, find shortest paths, rank vertices by centrality, find communities and plot them.

View example →

User Input

Ask for user input with Python's input() in your browser: convert answers to numbers, ask again after a bad answer and read several values.

View example →

LightGBM

Train gradient-boosted models with LightGBM in your browser: regression, classification, early stopping, category columns and feature importance.

View example →

Matplotlib

Run Matplotlib code in your browser. Draw line, bar and scatter charts, add legends, combine subplots and save figures as PNG.

View example →

NetworkX

Run NetworkX code in your browser. Build graphs, find shortest paths, rank nodes by centrality, find communities and draw them.

View example →

Numpy

Run NumPy code in your browser. Create and reshape arrays, filter values, compute statistics and solve linear systems.

View example →

OpenAI

Run OpenAI Python code in your browser. Call the Responses API, continue a conversation and get structured output.

View example →

OpenCV

Run OpenCV (cv2) code in your browser. Convert colours, blur, detect edges, draw shapes, find contours, resize and rotate images.

View example →

openpyxl

Read, edit and create Excel (.xlsx) files from Python in your browser, with formulas, styles and charts.

View example →

Pandas

Run pandas code in your browser. Build DataFrames, filter and sort rows, group and aggregate data, and read and write CSV files.

View example →

Panel App

Run Panel code in your browser. Build apps with sliders, dropdowns and buttons that update tables, charts and numbers.

View example →

Pillow

Run Pillow code in your browser. Draw shapes and text, resize, crop and rotate images, apply filters and convert formats.

View example →

Pingouin

Run Pingouin code in your browser. Run t-tests, ANOVA with post-hoc tests, correlations and assumption checks, with effect sizes.

View example →

Plotly

Run Plotly code in your browser. Make line, bar and scatter charts with Plotly Express, and build figures and subplots.

View example →

Polars

Run Polars code in your browser. Filter and add columns, group and aggregate, join DataFrames and build lazy queries.

View example →

python-pptx

Turn Python code into PowerPoint (.pptx) slides in your browser, with bullet points, tables, pictures and charts.

View example →

Pygal

Draw SVG charts with pygal in your browser: stacked bars, line and pie charts, custom colors, value labels and SVG files.

View example →

Pyinstrument

Find slow code with pyinstrument in your browser: profile a block, read the call tree, look inside library calls and show time as percentages.

View example →

pyyaml

Read and write YAML with PyYAML in your browser: safe_load versus load, value types, updating a file and multi-document streams.

View example →

Log Parsing with Regex

Parse web server logs with Python's re module in your browser: capture fields, name groups, count status codes and convert timestamps.

View example →

ReportLab

Create PDF files from Python in your browser, with paragraphs, styled tables, charts, page numbers and canvas drawing.

View example →

Scipy

Run SciPy code in your browser. Solve linear systems, minimize functions, fit curves, compute integrals and run statistical tests.

View example →

Seaborn

Run seaborn code in your browser. Draw scatter plots, histograms, box plots and heatmaps from pandas DataFrames.

View example →

Scikit-Image

Run scikit-image code in your browser. Load sample images, filter and threshold them, count objects, resize and rotate them.

View example →

Scikit-Learn

Run scikit-learn code in your browser. Train classifiers and regressors, scale data in pipelines and tune models.

View example →

SQLite3

Run SQLite queries with Python's sqlite3 module in your browser. Create tables, insert rows safely, filter, group and join.

View example →

Statsmodels

Run statsmodels code in your browser. Fit linear and logistic regressions, use R-style formulas and forecast with ARIMA.

View example →

SymPy

Run SymPy code in your browser. Solve equations and inequalities, simplify expressions, and find derivatives, integrals and limits.

View example →

Treelib

Run treelib code in your browser. Build and print trees, walk branches, move or remove subtrees and export to a dict or JSON.

View example →

Xarray

Analyze labeled multi-dimensional data with xarray in your browser: select by label, resample time series, take weighted means and save netCDF files.

View example →

XGBoost

Train gradient-boosted tree models with XGBoost in your browser: regression, classification, early stopping, feature importance and missing values.

View example →

xlsxwriter

Create Excel (.xlsx) files from Python in your browser, with formatting, formulas, charts and pandas DataFrames.

View example →