Registry / data / leather

leather

JSON →
library0.4.1pypypi✓ verified 25d ago

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
INSTALL
IMPORT
SIG · LEATHER
L
leather
datapythonv0.4.1
Install
1.5s avg
Import
198ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.4.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.218s · 18.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.178s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

leather
import leather
The primary module for interacting with the library.

This quickstart example demonstrates how to create a simple scatter plot with 100 random data points and apply a custom colorizing function based on the data values. The resulting chart is then saved as an SVG file.

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")
Debug
Known issues
breakingWith 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.
affects: >=0.4.1
gotchaLeather 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.
affects: All
gotchaWhen 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`.
affects: All
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'leather'
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`
ImportError: cannot import name 'Iterable' from 'collections'
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`
AttributeError: module 'leather' has no attribute 'Chart'
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')`
Upgrade
Version history
0.4.1latest on PyPI · released Dec 15, 2025
Audit
Dependencies
pythonrequiredRequires Python 3.10 or newer.
pytestoptionalFor running tests.
pytest-covoptionalFor test coverage reports.
lxmloptionalOptional dependency, version >=3.6.0.
cssselectoptionalOptional dependency, version >=0.9.1.
Agent activity
7 hits · last 30 days
node
6
Resources
leather — pip install leather · libregistry