trading_agent.client.package_commands
¶
The trading-agent packages commands: install, list and remove.
Typical usage example:
exit_code = PackageCommands(packages).run('install', 'https://github.com/someone/news-pack.git', replace=False)
PackageCommands
¶
Installs, lists and removes packages for the user.
Creates the commands.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
packages
|
InstalledPackages
|
The installed packages. |
required |
output
|
TextIO
|
Where to print. |
stdout
|
Source code in src/trading_agent/client/package_commands.py
run
¶
Runs one action.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action
|
str
|
"install", "list" or "remove". |
required |
argument
|
str | None
|
The source for "install", the name for "remove". |
required |
replace
|
bool
|
For "install", whether to replace an installed package of the same name. |
required |
Returns:
| Type | Description |
|---|---|
int
|
0 on success, 1 when the install or removal was refused. |