python

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package python provides AST-aware chunking for Python source files using tree-sitter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chunker

type Chunker struct {
	// contains filtered or unexported fields
}

Chunker implements AST-aware chunking for Python files.

func NewChunker

func NewChunker(options chunking.ChunkOptions) *Chunker

NewChunker creates a new Python chunker.

func (*Chunker) Chunk

func (c *Chunker) Chunk(ctx context.Context, filePath string) ([]chunking.Chunk, error)

Chunk parses a Python source file and returns semantic code chunks.

func (*Chunker) Language

func (c *Chunker) Language() chunking.Language

Language returns the language this chunker supports.

func (*Chunker) SupportedExtensions

func (c *Chunker) SupportedExtensions() []string

SupportedExtensions returns the file extensions this chunker handles.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL