{"id":16544782,"url":"https://github.com/lucafaggianelli/python-classnames","last_synced_at":"2026-05-05T16:09:41.278Z","repository":{"id":62652112,"uuid":"561425141","full_name":"lucafaggianelli/python-classnames","owner":"lucafaggianelli","description":"Utility to generate CSS class strings from a multitude of inputs without headaches","archived":false,"fork":false,"pushed_at":"2022-11-04T10:38:14.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-14T11:17:45.723Z","etag":null,"topics":["classnames","css","css-classes","html","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucafaggianelli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-03T16:56:24.000Z","updated_at":"2024-03-22T16:16:42.000Z","dependencies_parsed_at":"2022-11-04T11:54:31.513Z","dependency_job_id":null,"html_url":"https://github.com/lucafaggianelli/python-classnames","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucafaggianelli%2Fpython-classnames","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucafaggianelli%2Fpython-classnames/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucafaggianelli%2Fpython-classnames/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucafaggianelli%2Fpython-classnames/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucafaggianelli","download_url":"https://codeload.github.com/lucafaggianelli/python-classnames/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241678139,"owners_count":20001682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["classnames","css","css-classes","html","python"],"created_at":"2024-10-11T19:04:37.918Z","updated_at":"2026-05-05T16:09:41.226Z","avatar_url":"https://github.com/lucafaggianelli.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python classnames\n\n[![pypi](https://img.shields.io/pypi/v/classnames.svg)](https://pypi.org/project/classnames/)\n[![python](https://img.shields.io/pypi/pyversions/classnames.svg)](https://pypi.org/project/classnames/)\n[![Build Status](https://github.com/lucafaggianelli/python-classnames/actions/workflows/dev.yml/badge.svg)](https://github.com/lucafaggianelli/python-classnames/actions/workflows/dev.yml)\n[![codecov](https://codecov.io/gh/lucafaggianelli/python-classnames/branch/main/graphs/badge.svg)](https://codecov.io/github/lucafaggianelli/python-classnames)\n\nUtility to create CSS class strings from a multitude of values without poking around with string templates and lengthy logic.\n\nThis project is a Python porting of the JS library [`classnames`](https://github.com/JedWatson/classnames)\n\n## Show me the code!\n\n```bash\npip install classnames\n```\n\n```python\nfrom classnames import class_names\n\n# render_button() -\u003e \"btn btn--red\"\n# render_button(rounded=True) -\u003e \"btn btn--rounded btn--red\"\ndef render_button(rounded: bool = False, color = \"red\"):\n    class_names(\"btn\", f\"btn--{color}\", {\n        \"btn--rounded\": rounded\n    })\n```\n\n* Documentation: \u003chttps://lucafaggianelli.github.io/python-classnames\u003e\n* GitHub: \u003chttps://github.com/lucafaggianelli/python-classnames\u003e\n* PyPI: \u003chttps://pypi.org/project/python-classnames/\u003e\n\n## Features\n\n* TODO\n\n## Credits\n\nThis package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [waynerv/cookiecutter-pypackage](https://github.com/waynerv/cookiecutter-pypackage) project template.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucafaggianelli%2Fpython-classnames","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucafaggianelli%2Fpython-classnames","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucafaggianelli%2Fpython-classnames/lists"}