Documentation
¶
Overview ¶
Package python provides Python source file reader implementation.
Index ¶
- func New(opts ...reader.Option) reader.Reader
- type Reader
- func (r *Reader) Name() string
- func (r *Reader) ReadFromDirectory(dirPath string) ([]*document.Document, error)
- func (r *Reader) ReadFromFile(filePath string) ([]*document.Document, error)
- func (r *Reader) ReadFromReader(name string, rd io.Reader) ([]*document.Document, error)
- func (r *Reader) ReadFromURL(urlStr string) ([]*document.Document, error)
- func (r *Reader) SupportedExtensions() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader reads Python files and extracts AST-based entities.
func (*Reader) ReadFromDirectory ¶
ReadFromDirectory reads a Python package directory and returns AST entity documents.
func (*Reader) ReadFromFile ¶
ReadFromFile reads a Python file and returns a list of AST entity documents.
func (*Reader) ReadFromReader ¶
ReadFromReader reads Python content from an io.Reader and returns a list of documents.
func (*Reader) ReadFromURL ¶
ReadFromURL reads Python content from a URL and returns a list of documents.
func (*Reader) SupportedExtensions ¶
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. |
Click to show internal directories.
Click to hide internal directories.