lightning-utilities
Lightning toolbox for across the our ecosystem.
What it is and what it does
Lightning Utilities is a collection of shared development tools for Python projects, centered on CI/CD automation and common utility functions. It offers reusable GitHub workflows for schema checks and code validation, composite GitHub actions for caching and environment setup, and a Python module with utilities for handling optional imports and a CLI for managing requirement versions.
The package is designed to reduce duplication across projects by centralizing workflow definitions and common patterns. It depends only on packaging and typing_extensions, making it lightweight to add to projects. The CLI can automatically pin or unpin dependency versions in requirements files, and the core imports module helps handle optional dependencies gracefully.
Use it for:
- Standardize CI/CD checks across multiple repositories by referencing shared workflows from a central location.
- Manage Python requirement versions programmatically, converting version ranges to pinned versions or vice versa.
- Handle optional dependencies safely without hard failures when packages are not installed.
- Set up consistent caching strategies in GitHub Actions across projects using composite actions.
- Reduce boilerplate in GitHub Actions workflows by reusing tested composite action definitions.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides reusable GitHub workflows, composite actions, and Python utilities for CI/CD automation and requirement version management.
Yes, if you maintain multiple Python projects or use GitHub Actions for CI/CD. The package is actively maintained, has low install friction, and offers genuine value through workflow reuse and utility functions. The Apache-2.0 license is permissive. Install only if you actually use the GitHub workflows or need the CLI and import utilities; it is not a general-purpose dependency.
Install
lightning-utilities on PyPI
pip
pip install lightning-utilitiesuv
uv add lightning-utilitiespoetry
poetry add lightning-utilitiesInstalling lightning-utilities
Before you install
Low install friction with only two lightweight runtime dependencies (packaging and typing_extensions). Actively maintained with recent commits; marked as Alpha status.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install lightning_utilities
from lightning_utilities.core.imports import module_available
if module_available("package_name"):
# handle optional dependency
Requires Python 3.10 or later.
Verify before relying
- Whether the GitHub workflows and composite actions are compatible with non-Lightning-AI projects or require specific repository structure.
- Performance characteristics of the CLI requirement-version management for large dependency trees.
- Specific use cases and limitations of the module_available utility function.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — packaging, typing_extensions |
| Maintenance | actively maintained — 173 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 11,451,044/month — #1,395 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: lightning_utilities-0.15.3-py3-none-any.whl
Keywords: Utilities, DevOps, CI/CD
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
actionlint-pyactionlint-py provides a pip-installable…
permissive · top 15,000 on PyPI
tox-gh-actionsA tox plugin that automatically detects and…
permissive · top 15,000 on PyPI
pytest-github-actions-annotate-failuresA pytest plugin that automatically annotates…
permissive · top 5,000 on PyPI
scverse-miscProvides shared utility functions and helpers…
permissive · top 5,000 on PyPI
lightning-sdkPython SDK to create, manage, and automate…
permissive · top 15,000 on PyPI
lightningLightning is a framework that organizes PyTorch…
permissive · top 5,000 on PyPI
pytorch-lightningPyTorch Lightning wraps PyTorch training code…
permissive · top 5,000 on PyPI
pyproject2condaConverts Python project dependencies from…
unclear · top 15,000 on PyPI
azure-devopsProvides Python bindings to the Azure DevOps…
permissive · top 5,000 on PyPI
lightning-cloudProvides a Python client for interacting with…
permissive · top 15,000 on PyPI