Community Module¶
This section documents the community components of the Nextmv Cloud API.
community
¶
This module contains functionality for working with Nextmv community apps.
Community apps are pre-built decision models. They are maintained in the following GitHub repository: https://github.com/nextmv-io/community-apps
| CLASS | DESCRIPTION |
|---|---|
CommunityApp |
Representation of a Nextmv Cloud Community App. |
| FUNCTION | DESCRIPTION |
|---|---|
list_community_apps |
List the available Nextmv community apps. |
clone_community_app |
Clone a community app locally. |
CommunityApp
¶
Bases: BaseModel
Information about a Nextmv community app.
You can import the CommunityApp class directly from cloud:
| PARAMETER | DESCRIPTION |
|---|---|
|
Available versions of the community app.
TYPE:
|
|
Description of the community app.
TYPE:
|
|
The latest version of the community app.
TYPE:
|
|
The latest version of the community app in the Nextmv Marketplace.
TYPE:
|
|
Available versions of the community app in the Nextmv Marketplace.
TYPE:
|
|
Name of the community app.
TYPE:
|
|
Type of the community app.
TYPE:
|
app_type
class-attribute
instance-attribute
¶
app_type: str = Field(
serialization_alias="type",
validation_alias=AliasChoices("type", "app_type"),
)
Type of the community app.
app_versions
class-attribute
instance-attribute
¶
Available versions of the community app.
has_version
¶
has_version(version: str) -> bool
Check if the community app has the specified version.
| PARAMETER | DESCRIPTION |
|---|---|
|
The version to check.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if the app has the specified version, False otherwise. |
Source code in nextmv/nextmv/cloud/community.py
latest_app_version
class-attribute
instance-attribute
¶
The latest version of the community app.
latest_marketplace_version
class-attribute
instance-attribute
¶
The latest version of the community app in the Nextmv Marketplace.
marketplace_versions
class-attribute
instance-attribute
¶
Available versions of the community app in the Nextmv Marketplace.
clone_community_app
¶
clone_community_app(
client: Client,
app: str,
directory: str | None = None,
version: str | None = LATEST_VERSION,
verbose: bool = False,
rich_print: bool = False,
) -> None
Clone a community app locally.
By default, the latest version will be used. You can
specify a version with the version parameter, and customize the output
directory with the directory parameter. If you want to list the available
apps, use the list_community_apps function.
You can import the clone_community_app function directly from cloud:
| PARAMETER | DESCRIPTION |
|---|---|
|
The Nextmv Cloud client to use for the request.
TYPE:
|
|
The name of the community app to clone.
TYPE:
|
|
The directory in which to clone the app. Default is the name of the app at current directory.
TYPE:
|
|
The version of the community app to clone. Default is
TYPE:
|
|
Whether to print verbose output.
TYPE:
|
|
Whether to use rich printing for output messages.
TYPE:
|
Source code in nextmv/nextmv/cloud/community.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | |
list_community_apps
¶
list_community_apps(client: Client) -> list[CommunityApp]
List the available Nextmv community apps.
You can import the list_community_apps function directly from cloud:
| PARAMETER | DESCRIPTION |
|---|---|
|
The Nextmv Cloud client to use for the request.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[CommunityApp]
|
A list of available community apps. |