$npx skillfedfor your agent

tree-sitter-css

CSS grammar for tree-sitter

With conditionsPyPI LinguisticReleased Sep 20252.1M downloads / moMITPlatform wheel

Decision gist · record as of 2026-08-14

platform wheels — tree_sitter_css-0.25.0-cp310-abi3-macosx_10_9_x86_64.whl · tree_sitter_css-0.25.0-cp310-abi3-macosx_11_0_arm64.whl · tree_sitter_css-0.25.0-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
v0.25.0 · released 2025-09-28 · Python >=3.10

Yes, if you are already using tree-sitter in your Python project and need to parse CSS. The package is well-maintained within the tree-sitter ecosystem, has no known vulnerabilities, and offers permissive licensing. Medium install friction is typical for compiled language bindings. Not worth installing if you need a standalone CSS parser or do not already have tree-sitter as a dependency.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires tree-sitter core library and language bindings installed separately; Python 3.10 or later required.
  • Medium install friction due to compiled wheels; prebuilt binaries available for common platforms (x86_64, ARM, Windows).
  • Requires Python 3.10+.

License · maintenance · safety

MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

last release 2025-09-28 (320 days)

0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,074,204 downloads/mo, #3,319 on PyPI

Verify before relying

pip install tree-sitter-css

from tree_sitter import Language, Parser

# Load the CSS grammar and create a parser
CSS_LANGUAGE = Language('path/to/tree_sitter_css.so', 'css')
parser = Parser()
parser.set_language(CSS_LANGUAGE)

# Parse CSS code
tree = parser.parse(b'body { color: red; }')
  • Whether tree-sitter core library is automatically installed as a dependency or must be installed separately.
  • Specific tree-sitter API version compatibility for this grammar release.
  • Performance characteristics for large CSS files or real-time parsing scenarios.
Same gist for agents: .md · .json

What it is and what it does

tree-sitter-css is a language grammar module that plugs into the tree-sitter incremental parser framework to parse CSS code into syntax trees. It is not a standalone parser but rather a grammar definition that works with tree-sitter's core parsing engine, which must be installed separately. The package provides precompiled binaries for multiple platforms and Python versions, making it straightforward to add CSS parsing capabilities to Python applications that already use tree-sitter.

The grammar enables applications to parse CSS incrementally—updating only the parts of the syntax tree that changed when the source is edited—rather than reparsing the entire file. This is useful for code editors, linters, static analyzers, and other tools that need to understand CSS structure and maintain performance during interactive use.

Use it for

  • Build a CSS linter or formatter that understands the full syntax tree of stylesheets.
  • Implement a code editor with incremental CSS parsing for real-time syntax highlighting and error detection.
  • Analyze CSS codebases to extract selectors, properties, or dependencies for refactoring or auditing.
  • Create a CSS-aware code transformation tool that modifies stylesheets while preserving structure.
  • Develop a static analysis tool that detects CSS anti-patterns or unused rules.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you are already using tree-sitter in your Python project and need to parse CSS.

The package is well-maintained within the tree-sitter ecosystem, has no known vulnerabilities, and offers permissive licensing. Medium install friction is typical for compiled language bindings. Not worth installing if you need a standalone CSS parser or do not already have tree-sitter as a dependency.

Install

tree-sitter-css on PyPI

Before you install

Medium install friction due to compiled wheels; prebuilt binaries available for common platforms (x86_64, ARM, Windows). Requires Python 3.10+. Package is aging (320 days since last release) but shows no signs of abandonment.

Requires tree-sitter core library and language bindings installed separately; Python 3.10 or later required.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

Quickstart

pip install tree-sitter-css

from tree_sitter import Language, Parser

# Load the CSS grammar and create a parser
CSS_LANGUAGE = Language('path/to/tree_sitter_css.so', 'css')
parser = Parser()
parser.set_language(CSS_LANGUAGE)

# Parse CSS code
tree = parser.parse(b'body { color: red; }')

Verify before relying

  • Whether tree-sitter core library is automatically installed as a dependency or must be installed separately.
  • Specific tree-sitter API version compatibility for this grammar release.
  • Performance characteristics for large CSS files or real-time parsing scenarios.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionMedium. Platform-specific wheel
Runtime dependenciesNone
MaintenanceAging 320 days since the last release
First released
Downloads2,074,204 / month, #3,319 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Intended Audience :: DevelopersTopic :: Software Development :: CompilersTopic :: Text Processing :: LinguisticTyping :: Typed

Evidence: tree_sitter_css-0.25.0-cp310-abi3-macosx_10_9_x86_64.whl; tree_sitter_css-0.25.0-cp310-abi3-macosx_11_0_arm64.whl; tree_sitter_css-0.25.0-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; tree_sitter_css-0.25.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; tree_sitter_css-0.25.0-cp310-abi3-musllinux_1_2_aarch64.whl; tree_sitter_css-0.25.0-cp310-abi3-musllinux_1_2_x86_64.whl; tree_sitter_css-0.25.0-cp310-abi3-win_amd64.whl; tree_sitter_css-0.25.0-cp310-abi3-win_arm64.whl

Tags

Capabilities
css parser tree-sitterincremental css parsingcss syntax tree analysistree-sitter language bindingcss grammar parserparse css codecss ast generation
Topics
parsingtree-sittercss
PyPI keywords
incrementalparsingtree-sittercss

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “css parser tree-sitter”

  • tree-sitter-cssProvides a CSS grammar parser for tree-sitter, enabling incremental…
  • tree-sitter-xmlProvides a tree-sitter parser grammar for XML and DTD files, enabling…
  • tree-sitter-hclProvides a tree-sitter parser grammar for HCL and Terraform, enabling…

Give your agent the search over MCP, or paste the wish link into any chat.

More Linguistic packages

charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / mo
tiktoken Worth it
PyPI · Linguistic · released May 2026

tiktoken is a fast BPE tokenizer that converts text into token sequences compatible with OpenAI models, supporting multiple encoding schemes including o200k_base and model-specific encodings.

Install it if you work with OpenAI APIs or need to understand token boundaries in GPT-family models.

permissive licensecompiled wheel · 3.9+
233.0Mdownloads / mo
chardet Worth it
PyPI · Python Modules · released Aug 2026

Detects character encoding and language in byte sequences with high accuracy, supporting 99 encodings and returning confidence scores, language tags, and MIME types.

Install it if you need to detect character encoding or language in byte data; the rewrite makes it substantially faster and more accurate than its predecessors.

0BSDpure Python · 3.10+
199.0Mdownloads / mo
text-unidecode With conditions
PyPI · Python Modules · released Aug 2019

Converts Unicode text to ASCII by transliterating non-ASCII characters into their closest ASCII equivalents, with no runtime dependencies.

However, if transliteration quality or ongoing maintenance matters, consider unidecode instead despite its GPL-only license.

GPL-2.0-or-laterpure Pythonabandoned
89.0Mdownloads / mo
lark Worth it
PyPI · Python Modules · released Oct 2025

Lark is a parsing library that builds abstract syntax trees from context-free grammars, supporting multiple parsing algorithms (Earley, LALR(1), CYK) with automatic line and column tracking.

MITpure Python · 3.8+
79.7Mdownloads / mo
tree-sitter Worth it
PyPI · Linguistic · released Jun 2026

Python bindings to the tree-sitter parsing library, enabling incremental parsing and syntax tree analysis for source code.

MITcompiled wheel · 3.10+
79.0Mdownloads / mo

See also tree-sitter-java · tree-sitter-python · tree-sitter-html · tree-sitter-c · tree-sitter-json · tree-sitter-javascript · tree-sitter-powershell · tree-sitter-c-sharp · tree-sitter-go · tree-sitter-regex