Metadata-Version: 2.1
Name: classnames
Version: 0.1.0
Summary: Utility to create CSS class strings from a multitude of values without poking around with string templates and lengthy logic.
Home-page: https://github.com/lucafaggianelli/python-classnames
Author: Luca Faggianelli
Author-email: luca.faggianelli@gmail.com
License: MIT license
Keywords: classnames
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: AUTHORS.rst

# 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
