lightning-utilities 0.14.3
pip install lightning-utilities
Latest version
Released:
Lightning toolbox for across the our ecosystem.
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: Apache-2.0
- Author: Lightning AI et al.
- Tags Utilities, DevOps, CI/CD
- Requires: Python >=3.9
-
Provides-Extra:
typing
,cli
,docs
Classifiers
- Development Status
- Environment
- Intended Audience
- Natural Language
- Operating System
- Programming Language
Project description
Lightning Utilities
This repository covers the following use-cases:
- Reusable GitHub workflows
- Shared GitHub actions
- General Python utilities in
lightning_utilities.core
- CLI
python -m lightning_utilities.cli --help
1. Reusable workflows
Usage:
name: Check schema
on: [push]
jobs:
check-schema:
uses: Lightning-AI/utilities/.github/workflows/check-schema.yml@v0.5.0
with:
azure-dir: "" # skip Azure check
check-code:
uses: Lightning-AI/utilities/.github/workflows/check-code.yml@main
with:
actions-ref: main # normally you shall use the same version as the workflow
See usage of other workflows in .github/workflows/ci-use-checks.yaml.
2. Reusable composite actions
See available composite actions .github/actions/.
Usage:
name: Do something with cache
on: [push]
jobs:
pytest:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
- uses: Lightning-AI/utilities/.github/actions/cache
with:
python-version: 3.9
requires: oldest # or latest
3. General Python utilities lightning_utilities.core
Installation
From source:pip install https://github.com/Lightning-AI/utilities/archive/refs/heads/main.zip
From pypi:
pip install lightning_utilities
Usage:
Example for optional imports:
from lightning_utilities.core.imports import module_available
if module_available("some_package.something"):
from some_package import something
4. CLI lightning_utilities.cli
The package provides common CLI commands.
Installation
From pypi:
pip install lightning_utilities[cli]
Usage:
python -m lightning_utilities.cli [group] [command]
Example for setting min versions
$ cat requirements/test.txt
coverage>=5.0
codecov>=2.1
pytest>=6.0
pytest-cov
pytest-timeout
$ python -m lightning_utilities.cli requirements set-oldest
$ cat requirements/test.txt
coverage==5.0
codecov==2.1
pytest==6.0
pytest-cov
pytest-timeout
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: Apache-2.0
- Author: Lightning AI et al.
- Tags Utilities, DevOps, CI/CD
- Requires: Python >=3.9
-
Provides-Extra:
typing
,cli
,docs
Classifiers
- Development Status
- Environment
- Intended Audience
- Natural Language
- Operating System
- Programming Language
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file lightning_utilities-0.14.3.tar.gz
.
File metadata
- Download URL: lightning_utilities-0.14.3.tar.gz
- Upload date:
- Size: 30.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37e2f83f273890052955a44054382c211a303012ee577619efbaa5df9e65e9f5 |
|
MD5 | 5d25b79a628037cc76ecd5fd27cb8203 |
|
BLAKE2b-256 | 0fbb63a6a8c9e7a96b6ba92647fa5b1595c2dbee29f8178705adb4704d82ecba |
File details
Details for the file lightning_utilities-0.14.3-py3-none-any.whl
.
File metadata
- Download URL: lightning_utilities-0.14.3-py3-none-any.whl
- Upload date:
- Size: 28.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ab9066aa36cd7b93a05713808901909e96cc3f187ea6fd3052b2fd91313b468 |
|
MD5 | 8855c9a9c4134180f26c4d9863b6ee08 |
|
BLAKE2b-256 | 1ac131b3184cba7b257a4a3b5ca5b88b9204ccb7aa02fe3c992280899293ed54 |