{"modulePath":"github.com/kujenga/fossa-cli","version":"v0.7.24","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package python\n\nPackage python provides analysers for Python projects.\n\nA \\`BuildTarget\\` in Python is the directory of the Python project, generally containing \\`requirements.txt\\` or \\`setup.py\\`.\n\n## Functions\n\n```go\nfunc Discover(dir string, options map[string]interface{}) ([]module.Module, error)\n```\nDiscover constructs modules in all directories with a \\`requirements.txt\\` or \\`setup.py\\`.\n\n```go\nfunc FromRequirements(reqs []pip.Requirement) []pkg.Import\n```\n\n```go\nfunc FromTree(tree []pip.DepTree) ([]pkg.Import, map[pkg.ID]pkg.Package)\n```\n\n## Types\n\n```go\ntype Analyzer struct {\n\tPythonCmd     string\n\tPythonVersion string\n\n\tPipenv  pipenv.Pipenv\n\tPip     pip.Pip\n\tModule  module.Module\n\tOptions Options\n}\n```\n\n```go\nfunc New(m module.Module) (*Analyzer, error)\n```\n\n```go\nfunc (a *Analyzer) Analyze() (graph.Deps, error)\n```\n\n```go\nfunc (a *Analyzer) Build() error\n```\n\n```go\nfunc (a *Analyzer) Clean() error\n```\nClean logs a warning and does nothing for Python.\n\n```go\nfunc (a *Analyzer) IsBuilt() (bool, error)\n```\n\n```go\ntype Options struct {\n\tStrategy         string `mapstructure:\"strategy\"`\n\tRequirementsPath string `mapstructure:\"requirements\"`\n\tVirtualEnv       string `mapstructure:\"venv\"`\n}\n```\n\n","path":"github.com/kujenga/fossa-cli/analyzers/python","name":"python","synopsis":"Package python provides analysers for Python projects.","isRedistributable":true}
