python

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package python implements import extraction for Python source files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsStdlib

func IsStdlib(topLevel string) bool

IsStdlib reports whether the given top-level module name belongs to the Python standard library.

Types

type Extractor

type Extractor struct{}

Extractor extracts import facts from Python source files.

func New

func New() *Extractor

New returns a new Python extractor.

func (*Extractor) Clone

func (e *Extractor) Clone() extractor.Extractor

func (*Extractor) Extensions

func (e *Extractor) Extensions() []string

func (*Extractor) Extract

func (e *Extractor) Extract(filePath string, content []byte) ([]model.ImportFact, error)

Extract parses Python source and returns all import facts.

func (*Extractor) ExtractDefinitions

func (e *Extractor) ExtractDefinitions(content []byte, symbolNames []string) []string

ExtractDefinitions returns signature lines for the given symbol names. Matches: def X(...), class X(...):, X = ..., X: Type = ...

func (*Extractor) Language

func (e *Extractor) Language() string

Jump to

Keyboard shortcuts

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