python

package module
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package python provides Python source file reader implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...reader.Option) reader.Reader

New creates a new Python reader with the given options.

Types

type Reader

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

Reader reads Python files and extracts AST-based entities.

func (*Reader) Name

func (r *Reader) Name() string

Name returns the name of this reader.

func (*Reader) ReadFromDirectory

func (r *Reader) ReadFromDirectory(dirPath string) ([]*document.Document, error)

ReadFromDirectory reads a Python package directory and returns AST entity documents.

func (*Reader) ReadFromFile

func (r *Reader) ReadFromFile(filePath string) ([]*document.Document, error)

ReadFromFile reads a Python file and returns a list of AST entity documents.

func (*Reader) ReadFromReader

func (r *Reader) ReadFromReader(name string, rd io.Reader) ([]*document.Document, error)

ReadFromReader reads Python content from an io.Reader and returns a list of documents.

func (*Reader) ReadFromURL

func (r *Reader) ReadFromURL(urlStr string) ([]*document.Document, error)

ReadFromURL reads Python content from a URL and returns a list of documents.

func (*Reader) SupportedExtensions

func (r *Reader) SupportedExtensions() []string

SupportedExtensions returns the file extensions this reader supports.

Directories

Path Synopsis
internal
codeast/python
Package python provides Python AST parsing via an embedded Python script.
Package python provides Python AST parsing via an embedded Python script.

Jump to

Keyboard shortcuts

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