--- id: lightning-utilities version: "0.15.3" license: Apache-2.0 license_treatment: permissive maintenance: active --- # lightning-utilities — Lightning toolbox for across the our ecosystem. License: permissive · Maintenance: active · Downloads: 11.5M/mo ## 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 above — 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 pip install lightning-utilities uv add lightning-utilities poetry add lightning-utilities ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 11.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags github workflows reusable, ci/cd utilities, github actions composite, python devops tools, requirement version management, workflow automation, lightning utilities, ci-cd, github-actions, devops [View on SkillFed](https://skillfed.io/packages/lightning-utilities) · [View on PyPI](https://pypi.org/project/lightning-utilities/)