{"modulePath":"github.com/slackapi/slack-cli","version":"v0.0.0-20261124200210-0bde480cb96b","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package python\n\n## Functions\n\n```go\nfunc ActivateVenvIfPresent(fs afero.Fs, osClient types.Os, projectDir string) (bool, error)\n```\nActivateVenvIfPresent sets the process environment variables that a Python virtual environment's activate script would set, so that child processes (hook scripts) inherit the activated venv. This is a no-op when no .venv directory exists in projectDir.\n\nThe three env vars (VIRTUAL\\_ENV, PATH, PYTHONHOME) are the stable contract defined by PEP 405 (Python 3.3, 2012). Other tools (Poetry, tox, pipx) use the same approach. Sourcing the shell-specific activate script (activate, activate.fish, Activate.ps1) would be higher maintenance because it varies by shell.\n\n```go\nfunc IsRuntimeForProject(ctx context.Context, fs afero.Fs, dirPath string, sdkConfig hooks.SDKCLIConfig) bool\n```\nIsRuntimeForProject returns true if dirPath is a Python project\n\n## Types\n\n```go\ntype Python struct {\n}\n```\nPython runtime type\n\n```go\nfunc New() *Python\n```\nNew creates a new Python runtime\n\n```go\nfunc (p *Python) HooksJSONTemplate() []byte\n```\nHooksJSONTemplate returns the default hooks.json template\n\n```go\nfunc (p *Python) IgnoreDirectories() []string\n```\nIgnoreDirectories is a list of directories to ignore when packaging the runtime for deployment.\n\n```go\nfunc (p *Python) InstallProjectDependencies(ctx context.Context, projectDirPath string, hookExecutor hooks.HookExecutor, ios iostreams.IOStreamer, fs afero.Fs, os types.Os) (output string, err error)\n```\nInstallProjectDependencies creates a virtual environment and installs project dependencies.\n\n```go\nfunc (p *Python) Name() string\n```\nName prints the name of the runtime\n\n```go\nfunc (p *Python) PreparePackage(ctx context.Context, sdkConfig hooks.SDKCLIConfig, hookExecutor hooks.HookExecutor, opts types.PreparePackageOpts) error\n```\nPreparePackage will prepare and copy the app in projectDirPath to tmpDirPath as a release-ready bundle.\n\n```go\nfunc (p *Python) SetVersion(version string)\n```\nSetVersion sets the Version value\n\n```go\nfunc (p *Python) Version() string\n```\nVersion is the runtime version used by the hosted app deployment\n\n","path":"github.com/slackapi/slack-cli/internal/runtime/python","name":"python","synopsis":"","isRedistributable":true}
