Python classnames
Utility to create CSS class strings from a multitude of values without poking around with string templates and lengthy logic.
This project is a Python porting of the JS library classnames
Show me the code!
pip install classnames
from classnames import class_names
# render_button() -> "btn btn--red"
# render_button(rounded=True) -> "btn btn--rounded btn--red"
def render_button(rounded: bool = False, color = "red"):
class_names("btn", f"btn--{color}", {
"btn--rounded": rounded
})
- Documentation: https://lucafaggianelli.github.io/python-classnames
- GitHub: https://github.com/lucafaggianelli/python-classnames
- PyPI: https://pypi.org/project/python-classnames/
Features
- TODO
Credits
This package was created with Cookiecutter and the waynerv/cookiecutter-pypackage project template.
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
0.1.0 - 2022-11-04
- initial release
Metadata
Release files for classnames 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| classnames-0.1.0.tar.gz | 6.3 kB | Without provenance | Details for classnames-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| classnames-0.1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for classnames-0.1.0-py2.py3-none-any.whl |
Total release size: 10.2 kB
Release files / classnames-0.1.0.tar.gz
| Download URL | classnames-0.1.0.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9d69d34ba55ef75e88a42e881c069aed42cb351a28301f99cf539c7d1156906e
|
|
BLAKE2b-256 checksum How to use checksums |
c42150922c532fad8a96c70c88c358aa79daea49cbfcf9c818cf7d2666b75fb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Release files / classnames-0.1.0-py2.py3-none-any.whl
| Download URL | classnames-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
bc7827b7fbb9b0205e71d1968965b8ab67f3717b0079954a3b033ffe4aea9665
|
|
BLAKE2b-256 checksum How to use checksums |
17e37a115f1fc7e5d8c6d85c387df2ccb92e3e45b3530368eed07c31e7908652
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Security for classnames 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.