Leather Charting Library
raw JSON → 0.4.1 verified Tue May 12 auth: no python install: verified
Leather is a Python charting library designed for quickly generating straightforward visualizations, often described as 'charting for 80% of humans.' It currently stands at version 0.4.1, with its last release in December 2025. The library focuses on ease of use and producing functional charts without extensive customization options.
pip install leather Common errors
error ModuleNotFoundError: No module named 'leather' ↓
cause The 'leather' library is not installed in the Python environment, or the environment where the code is run does not have access to the installed library.
fix
Ensure the library is installed using pip:
pip install leather error ImportError: cannot import name 'Iterable' from 'collections' ↓
cause This error occurs in Python versions 3.9 and above because `collections.Iterable` (and `collections.MutableMapping`) were deprecated and subsequently removed, moving to `collections.abc.Iterable` (and `collections.abc.MutableMapping`). Older versions of the 'leather' library might still try to import them from the old location.
fix
Upgrade the 'leather' library to its latest version (0.4.1 or newer) which should be compatible with modern Python versions:
pip install --upgrade leather error AttributeError: module 'leather' has no attribute 'Chart' ↓
cause The user is attempting to access a class or function named 'Chart' directly from the top-level 'leather' module, but it is typically meant to be imported or accessed as `leather.Chart()` after importing `leather`.
fix
Instantiate the
Chart object correctly using leather.Chart() or import it explicitly if available: import leather; chart = leather.Chart('My Chart') Warnings
breaking With the release of version 0.4.1, official support for Python 3.8 and 3.9 was dropped. While the 'requires_python' metadata might be broader, the package classifiers for 0.4.1 explicitly list Python 3.10, 3.11, 3.12, 3.13, and 3.14. Installations on Python 3.8 or 3.9 may encounter issues or be unsupported. ↓
fix Upgrade your Python environment to version 3.10 or newer to ensure compatibility and full support.
gotcha Leather is designed for quick and simple charting. Extensive customization of chart styles is neither expected nor officially recommended. Attempting deep customization may require direct manipulation of the generated SVG or significant workarounds. ↓
fix Embrace the library's default aesthetic for rapid prototyping, or consider alternative libraries for highly customized or complex visual requirements.
gotcha When manually adjusting tick values using methods like `Chart.add_x_axis()` or `Chart.add_y_axis()`, the chart's scale is not automatically adjusted. This can result in custom tick labels falling outside the visible range of the rendered chart if not carefully aligned with the data bounds. ↓
fix Ensure that any custom tick values you provide are consistent with the data range and the scales automatically (or manually) determined by the chart, or explicitly set the chart's `x_scale` and `y_scale`.
Install compatibility verified last tested: 2026-05-12
python os / libc status wheel install import disk
3.10 alpine (musl) wheel - 0.17s 18.1M
3.10 alpine (musl) - - 0.19s 18.1M
3.10 slim (glibc) wheel 1.5s 0.12s 19M
3.10 slim (glibc) - - 0.11s 19M
3.11 alpine (musl) wheel - 0.23s 20.0M
3.11 alpine (musl) - - 0.25s 20.0M
3.11 slim (glibc) wheel 1.5s 0.18s 20M
3.11 slim (glibc) - - 0.18s 20M
3.12 alpine (musl) wheel - 0.23s 11.8M
3.12 alpine (musl) - - 0.26s 11.8M
3.12 slim (glibc) wheel 1.4s 0.21s 12M
3.12 slim (glibc) - - 0.24s 12M
3.13 alpine (musl) wheel - 0.24s 11.6M
3.13 alpine (musl) - - 0.26s 11.4M
3.13 slim (glibc) wheel 1.5s 0.22s 12M
3.13 slim (glibc) - - 0.25s 12M
3.9 alpine (musl) wheel - 0.17s 17.6M
3.9 alpine (musl) - - 0.17s 17.6M
3.9 slim (glibc) wheel 1.8s 0.12s 18M
3.9 slim (glibc) - - 0.13s 18M
Imports
- leather
import leather
Quickstart last tested: 2026-04-24
import random
import leather
# Generate some random data
dot_data = [(random.randint(0, 250), random.randint(0, 250)) for i in range(100)]
# Define a colorizing function based on data values
def colorizer(d):
return 'rgb(%i, %i, %i)' % (d.x, d.y, 150)
# Create a chart and add dots with custom colors
chart = leather.Chart('Colorized dots')
chart.add_dots(dot_data, fill_color=colorizer)
# Save the chart to an SVG file
chart.to_svg('colorized_dots.svg')
print("Chart saved to colorized_dots.svg")