{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/9"}],"enrichment":{"capability":"dict2css converts Python dictionaries to CSS stylesheets and parses CSS back into dictionaries, with an API modeled on json and toml modules.","skillfed_tags":["css-generation","serialization"],"use_cases":["Generate CSS stylesheets programmatically from configuration dictionaries in static site generators or template engines.","Parse existing CSS files into Python dicts for inspection, modification, or transformation.","Build theme or style configuration systems where CSS is defined as nested Python data structures.","Serialize dynamic styling rules computed at runtime into valid CSS output."],"what_it_does":"dict2css is a lightweight library that bridges Python dictionaries and CSS stylesheets. It provides dump and load functions\u2014similar to the json and toml standard library modules\u2014allowing you to construct CSS from nested Python dicts where keys are CSS selectors and values are property mappings. Property values can optionally include an \"important\" flag as a tuple. The library depends on domdf-python-tools and tinycss2 for parsing and serialization.\n\nThe package targets developers who want to programmatically generate or manipulate CSS within Python, such as in static site generators, template systems, or configuration-driven styling. It is typed, actively maintained, and supports modern Python versions from 3.8 onward.","worth_installing":"Yes, if you need to work with CSS as Python data structures. The library is small, actively maintained, has no known vulnerabilities, and installs with low friction. MIT licensing is unrestrictive. The main unknown is whether it handles advanced CSS features (at-rules, media queries) or only basic selectors and properties\u2014verify against your use case before committing."},"id":"dict2css","links":{"html":"https://skillfed.io/packages/dict2css","md":"https://skillfed.io/packages/dict2css.md","pypi":"https://pypi.org/project/dict2css/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-05-21","license_spdx":null,"license_treatment":"permissive","name":"dict2css","python_support":"supports_current","summary":"A \u03bc-library for constructing cascading style sheets from Python dictionaries."},"popularity":{"monthly_downloads":669534,"position":5413,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.6.0"}
