{"id":42746481,"url":"https://github.com/pydsigner/python-lightningcss","last_synced_at":"2026-01-29T19:22:07.729Z","repository":{"id":187573842,"uuid":"677250286","full_name":"pydsigner/python-lightningcss","owner":"pydsigner","description":"Opinionated Python bindings for lightningcss.","archived":false,"fork":false,"pushed_at":"2025-12-18T02:05:10.000Z","size":50,"stargazers_count":8,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-19T08:49:21.019Z","etag":null,"topics":["css","cssminifier","minifier","webdevelopment"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/lightningcss/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pydsigner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-08-11T05:26:04.000Z","updated_at":"2025-12-18T02:05:14.000Z","dependencies_parsed_at":"2023-08-11T06:16:43.509Z","dependency_job_id":"29d86280-497b-4edf-9d18-a47802cf8ac8","html_url":"https://github.com/pydsigner/python-lightningcss","commit_stats":null,"previous_names":["pydsigner/python-lightningcss"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/pydsigner/python-lightningcss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pydsigner%2Fpython-lightningcss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pydsigner%2Fpython-lightningcss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pydsigner%2Fpython-lightningcss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pydsigner%2Fpython-lightningcss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pydsigner","download_url":"https://codeload.github.com/pydsigner/python-lightningcss/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pydsigner%2Fpython-lightningcss/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28883087,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T16:41:59.663Z","status":"ssl_error","status_checked_at":"2026-01-29T16:39:39.641Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["css","cssminifier","minifier","webdevelopment"],"created_at":"2026-01-29T19:22:04.687Z","updated_at":"2026-01-29T19:22:07.725Z","avatar_url":"https://github.com/pydsigner.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"[![PyPI - Project Version](https://img.shields.io/pypi/v/lightningcss)](https://pypi.org/project/lightningcss)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/lightningcss)](https://pypi.org/project/lightningcss)\n[![GitHub - Project License](https://img.shields.io/github/license/pydsigner/python-lightningcss)](https://github.com/pydsigner/python-lightningcss)\n\n# python-lightningcss\n\npython-lightningcss offers PyO3 bindings to the lightningcss library. Presently\nonly a subset of functionality is exposed, intended for integration into a\nPython-centric web application rather than a JavaScript-based workflow. If the\nlatter is needed, consider using the [official npm lightningcss module, parcel,\nor webpack](https://lightningcss.dev/docs.html) instead.\n\n## Installation\n\npython-lightningcss includes wheels which can be installed for most platforms\nusing pip:\n\n    $ pip install lightningcss\n\nAlternatively, python-lightningcss may be installed directly from source:\n\n    $ pip install git+https://github.com/pydsigner/python-lightningcss\n\nThis will require that the Rust toolchain be installed.\n\n## Usage\n\n```py\nimport lightningcss\n\nparser_flags = lightningcss.calc_parser_flags(nesting=True)\n\ninput_css = \"\"\"\n.navbar {\n    margin: 0;\n\n    a {\n        padding-left: 0;\n        padding-right: 0;\n        padding-top: 5px;\n        padding-bottom: 5px;\n    }\n}\n\"\"\"\n\noutput_css = lightningcss.process_stylesheet(\n    input_css,\n    filename=\"abc.css\",\n    parser_flags = parser_flags,\n    browsers_list = ['defaults'],\n    minify = True,\n)\n```\n\nThe `filename` keyword parameter is only used for displaying error messages from\nthe parser. When using `browsers_list`, lightningcss will try to transpile the\ncode to be compatible with the specified\n[browserslist target](https://browsersl.ist/).\n\nThis package also supports creating a CSS bundle where all `@import` rules are\nresolved into a single stylesheet:\n\n```py\nbundled_css = lightningcss.bundle_css(\n    \"main.css\",\n    browsers_list = [\"defaults\"],\n    minify = False,\n)\n```\n\nAll resources referenced via `@import` are resolved relative to the main file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpydsigner%2Fpython-lightningcss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpydsigner%2Fpython-lightningcss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpydsigner%2Fpython-lightningcss/lists"}