Metadata-Version: 2.4
Name: rbtr-lang-python
Version: 2026.9.0.dev3
Summary: rbtr — Python language plugin
Keywords: code-search,code-index,tree-sitter,static-analysis,semantic-search,developer-tools,python
Author: Alejandro Giacometti
Author-email: Alejandro Giacometti <alejandro.giacometti@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Text Processing :: Indexing
Classifier: Typing :: Typed
Requires-Dist: rbtr==2026.9.0.dev3
Requires-Dist: tree-sitter-python
Requires-Python: >=3.13
Project-URL: Homepage, https://github.com/janrito/rbtr
Project-URL: Repository, https://github.com/janrito/rbtr
Project-URL: Documentation, https://github.com/janrito/rbtr/tree/main/packages/rbtr-lang-python#readme
Project-URL: Issues, https://github.com/janrito/rbtr/issues
Project-URL: Changelog, https://github.com/janrito/rbtr/releases
Description-Content-Type: text/markdown

# rbtr-lang-python

Python support for [rbtr]. A **default** plugin — installed with rbtr
itself (`pip install rbtr`).

[rbtr]: https://github.com/janrito/rbtr/tree/main/packages/rbtr#readme

## What it ingests

- **Functions & methods** — `def` / `async def`; methods are scoped to their
  enclosing class.
- **Classes** — class definitions (which also form a scope for their members).
- **Variables** — module-level assignments, including flat tuple unpacking.
  Function locals and class attributes stay within their enclosing chunk.
- **Imports** — `import` and `from … import` (relative, aliased, multi-name)
  → import chunks with resolved module + names, for cross-file edges.

A symbol's docstring (the leading `"""…"""`) is folded into its chunk content.

## Chunks produced

```python
def greet(name): ...  # function "greet"


class User:  # class "User"
    def save(self): ...  #   method "save", scope "User"


MAX = 100  # variable "MAX"
from .utils import helper  # import, metadata {module: ".utils", names: "helper"}
```

## Embedded / injected chunks

None of its own — Python is embedded *by* Markdown fenced code blocks, which
delegate ` ```python ` blocks here.

## Grammar & dependencies

Uses the `tree-sitter-python` grammar. No dependency on other language plugins.
