{"id":892,"library":"leather","title":"Leather Charting Library","description":"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.","status":"active","version":"0.4.1","language":"python","source_language":"en","source_url":"https://github.com/wireservice/leather","tags":["charting","data visualization","plotting","svg"],"install":[{"cmd":"pip install leather","lang":"bash","label":"Standard Installation"}],"dependencies":[{"reason":"Requires Python 3.10 or newer.","package":"python","optional":false},{"reason":"For running tests.","package":"pytest","optional":true},{"reason":"For test coverage reports.","package":"pytest-cov","optional":true},{"reason":"Optional dependency, version >=3.6.0.","package":"lxml","optional":true},{"reason":"Optional dependency, version >=0.9.1.","package":"cssselect","optional":true}],"imports":[{"note":"The primary module for interacting with the library.","symbol":"leather","correct":"import leather"}],"quickstart":{"code":"import random\nimport leather\n\n# Generate some random data\ndot_data = [(random.randint(0, 250), random.randint(0, 250)) for i in range(100)]\n\n# Define a colorizing function based on data values\ndef colorizer(d):\n    return 'rgb(%i, %i, %i)' % (d.x, d.y, 150)\n\n# Create a chart and add dots with custom colors\nchart = leather.Chart('Colorized dots')\nchart.add_dots(dot_data, fill_color=colorizer)\n\n# Save the chart to an SVG file\nchart.to_svg('colorized_dots.svg')\nprint(\"Chart saved to colorized_dots.svg\")","lang":"python","description":"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."},"warnings":[{"fix":"Upgrade your Python environment to version 3.10 or newer to ensure compatibility and full support.","message":"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.","severity":"breaking","affected_versions":">=0.4.1"},{"fix":"Embrace the library's default aesthetic for rapid prototyping, or consider alternative libraries for highly customized or complex visual requirements.","message":"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.","severity":"gotcha","affected_versions":"All"},{"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`.","message":"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.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-05-12T20:59:17.438Z","next_check":"2026-06-27T00:00:00.000Z","problems":[{"fix":"Ensure the library is installed using pip: `pip install 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.","error":"ModuleNotFoundError: No module named 'leather'"},{"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`","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.","error":"ImportError: cannot import name 'Iterable' from 'collections'"},{"fix":"Instantiate the `Chart` object correctly using `leather.Chart()` or import it explicitly if available: `import leather; chart = leather.Chart('My 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`.","error":"AttributeError: module 'leather' has no attribute 'Chart'"}],"ecosystem":"pypi","meta_description":null,"install_score":100,"install_tag":"verified","quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.4.1","cli_name":"","cli_version":null,"install_checks":{"last_tested":"2026-05-12","tag":"verified","tag_description":"installs cleanly on critical runtimes, fast import, recently tested","installed_version":"0.4.1","pypi_latest":"0.4.1","is_stale":false,"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"leather","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.17,"mem_mb":4.1,"disk_size":"18.1M"},{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"leather","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.19,"mem_mb":4.1,"disk_size":"18.1M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"leather","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.5,"import_time_s":0.12,"mem_mb":4.1,"disk_size":"19M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"leather","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.11,"mem_mb":4.1,"disk_size":"19M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"leather","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.23,"mem_mb":4.3,"disk_size":"20.0M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"leather","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.25,"mem_mb":4.3,"disk_size":"20.0M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"leather","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.5,"import_time_s":0.18,"mem_mb":4.3,"disk_size":"20M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"leather","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.18,"mem_mb":4.3,"disk_size":"20M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"leather","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.23,"mem_mb":4.2,"disk_size":"11.8M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"leather","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.26,"mem_mb":4.2,"disk_size":"11.8M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"leather","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.4,"import_time_s":0.21,"mem_mb":4.2,"disk_size":"12M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"leather","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.24,"mem_mb":4.2,"disk_size":"12M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"leather","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.24,"mem_mb":4.9,"disk_size":"11.6M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"leather","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.26,"mem_mb":4.5,"disk_size":"11.4M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"leather","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.5,"import_time_s":0.22,"mem_mb":4.9,"disk_size":"12M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"leather","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.25,"mem_mb":4.3,"disk_size":"12M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"leather","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.17,"mem_mb":4,"disk_size":"17.6M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"leather","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.17,"mem_mb":4,"disk_size":"17.6M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"leather","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.8,"import_time_s":0.12,"mem_mb":4,"disk_size":"18M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"leather","exit_code":0,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":0.13,"mem_mb":4,"disk_size":"18M"}]},"quickstart_checks":{"last_tested":"2026-04-24","tag":null,"tag_description":null,"results":[{"runtime":"python:3.10-alpine","exit_code":0},{"runtime":"python:3.10-slim","exit_code":0},{"runtime":"python:3.11-alpine","exit_code":0},{"runtime":"python:3.11-slim","exit_code":0},{"runtime":"python:3.12-alpine","exit_code":0},{"runtime":"python:3.12-slim","exit_code":0},{"runtime":"python:3.13-alpine","exit_code":0},{"runtime":"python:3.13-slim","exit_code":0},{"runtime":"python:3.9-alpine","exit_code":0},{"runtime":"python:3.9-slim","exit_code":0}]}}