semvec/pypi-packages huggingface dataset:
classnames 0.1.0
Utility to create CSS class strings from a multitude of values without poking around with string templates and lengthy logic.
License: MIT license
Requires Python: >=3.6
Keywords: classnames

# Python classnames

[![pypi](https://img.shields.io/pypi/v/classnames.svg)](https://pypi.org/project/classnames/)
[![python](https://img.shields.io/pypi/pyversions/classnames.svg)](https://pypi.org/project/classnames/)
[![Build Status](https://github.com/lucafaggianelli/python-classnames/actions/workflows/dev.yml/badge.svg)](https://github.com/lucafaggianelli/python-classnames/actions/workflows/dev.yml)
[![codecov](https://codecov.io/gh/lucafaggianelli/python-classnames/branch/main/graphs/badge.svg)](https://codecov.io/github/lucafaggianelli/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`](https://github.com/JedWatson/classnames)

## Show me the code!

```bash
pip install classnames
```

```python
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](https://github.com/audreyr/cookiecutter) and the [waynerv/cookiecutter-pypackage](https://github.com/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

<!-- Links -->
[keep a changelog]: https://keepachangelog.com/en/1.0.0/
[semantic versioning]: https://semver.org/spec/v2.0.0.html

<!-- Versions -->
[unreleased]: https://github.com/lucafaggianelli/python-classnames/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/lucafaggianelli/python-classnames/releases/tag/v0.1.0