Marketplace module¶
Reference to the cloud.marketplace.py module.
marketplace
¶
Marketplace module for interacting with Nextmv Marketplace.
This module provides functionality to interact with the Nextmv Marketplace, including marketplace application management, versioning, and subscription management.
| CLASS | DESCRIPTION |
|---|---|
MarketplaceState |
Enumeration of marketplace application states. |
MarketplaceVersion |
A marketplace application version in Nextmv Cloud. |
MarketplaceApplication |
A marketplace application in Nextmv Cloud. |
MarketplaceSubscription |
A marketplace subscription in Nextmv Cloud. |
| FUNCTION | DESCRIPTION |
|---|---|
list_marketplace_applications |
List all marketplace applications. |
list_marketplace_subscriptions |
List all marketplace subscriptions. |
MarketplaceState
¶
Enumeration of marketplace application states.
You can import the MarketplaceState class directly from cloud:
| ATTRIBUTE | DESCRIPTION |
|---|---|
RELEASED |
The application is released and available in the marketplace.
TYPE:
|
PRE_RELEASE |
The application is in pre-release state.
TYPE:
|
RETRACTED |
The application has been retracted from the marketplace.
TYPE:
|
RELEASED
class-attribute
instance-attribute
¶
The application is released and available in the marketplace.
PRE_RELEASE
class-attribute
instance-attribute
¶
The application is in pre-release state.
RETRACTED
class-attribute
instance-attribute
¶
The application has been retracted from the marketplace.
MarketplaceVersion
¶
Bases: BaseModel
A marketplace application version in Nextmv Cloud.
You can import the MarketplaceVersion class directly from cloud:
| ATTRIBUTE | DESCRIPTION |
|---|---|
version_id |
The unique identifier of the marketplace application version.
TYPE:
|
change_log |
The changelog for the marketplace application version. |
app_id |
The unique identifier of the marketplace application.
TYPE:
|
partner_id |
The unique identifier of the partner that created the marketplace application.
TYPE:
|
created_at |
The date and time when the marketplace application version was created.
TYPE:
|
updated_at |
The date and time when the marketplace application version was last updated.
TYPE:
|
version_id
class-attribute
instance-attribute
¶
version_id: str = Field(
serialization_alias="id",
validation_alias=AliasChoices("id", "version_id"),
)
The unique identifier of the marketplace application version.
change_log
instance-attribute
¶
The changelog for the marketplace application version.
partner_id
instance-attribute
¶
partner_id: str
The unique identifier of the partner that created the marketplace application.
MarketplaceApplication
¶
Bases: BaseModel
A marketplace application in Nextmv Cloud.
You can import the MarketplaceApplication class directly from cloud:
| ATTRIBUTE | DESCRIPTION |
|---|---|
app_id |
The unique identifier of the marketplace application.
TYPE:
|
reference_app_id |
The unique identifier of the reference application.
TYPE:
|
partner_id |
The unique identifier of the partner that created the marketplace application.
TYPE:
|
title |
The title of the marketplace application.
TYPE:
|
state |
The state of the marketplace application.
TYPE:
|
description |
The description of the marketplace application.
TYPE:
|
categories |
The categories of the marketplace application. |
features |
The features of the marketplace application. |
created_at |
The date and time when the marketplace application was created.
TYPE:
|
updated_at |
The date and time when the marketplace application was last updated.
TYPE:
|
latest_versions |
The latest versions of the marketplace application. |
client |
Client to use for interacting with the Nextmv Cloud API. This is an SDK-specific attribute and it is not part of the API representation of a marketplace application.
TYPE:
|
endpoint |
Base endpoint for the application. This is an SDK-specific attribute and it is not part of the API representation of a marketplace application.
TYPE:
|
app_id
class-attribute
instance-attribute
¶
app_id: str = Field(
serialization_alias="id",
validation_alias=AliasChoices("id", "app_id"),
)
The unique identifier of the marketplace application.
partner_id
instance-attribute
¶
partner_id: str
The unique identifier of the partner that created the marketplace application.
reference_app_id
class-attribute
instance-attribute
¶
reference_app_id: str | None = Field(
serialization_alias="ref_app_id",
validation_alias=AliasChoices(
"ref_app_id", "reference_app_id"
),
default=None,
)
The unique identifier of the reference application.
description
class-attribute
instance-attribute
¶
description: str | None = None
The description of the marketplace application.
categories
class-attribute
instance-attribute
¶
The categories of the marketplace application.
features
class-attribute
instance-attribute
¶
The features of the marketplace application.
created_at
class-attribute
instance-attribute
¶
created_at: datetime | None = None
The date and time when the marketplace application was created.
updated_at
class-attribute
instance-attribute
¶
updated_at: datetime | None = None
The date and time when the marketplace application was last updated.
latest_versions
class-attribute
instance-attribute
¶
The latest versions of the marketplace application.
client
class-attribute
instance-attribute
¶
Client to use for interacting with the Nextmv Cloud API. This is an SDK-specific attribute and it is not part of the API representation of a marketplace application.
endpoint
class-attribute
instance-attribute
¶
endpoint: str = Field(
exclude=True,
default="v1/marketplace/partners/{partner_id}/apps/{app_id}",
)
Base endpoint for the application. This is an SDK-specific attribute and it is not part of the API representation of a marketplace application.
model_post_init
¶
Initialize the endpoint attributes.
This method is called after the model is initialized.
Source code in nextmv-py/nextmv/nextmv/cloud/marketplace.py
get
classmethod
¶
get(
client: Client, partner_id: str, app_id: str
) -> MarketplaceApplication
Get a marketplace application by its ID.
| PARAMETER | DESCRIPTION |
|---|---|
|
Client to use for interacting with the Nextmv Cloud API.
TYPE:
|
|
The unique identifier of the partner that created the marketplace application.
TYPE:
|
|
The unique identifier of the marketplace application.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
MarketplaceApplication
|
The marketplace application with the specified ID. |
| RAISES | DESCRIPTION |
|---|---|
HTTPError
|
If the response status code is not 2xx. |
Source code in nextmv-py/nextmv/nextmv/cloud/marketplace.py
new
classmethod
¶
new(
client: Client,
partner_id: str,
reference_app_id: str,
title: str,
app_id: str | None = None,
description: str | None = None,
categories: list[str] | None = None,
features: list[str] | None = None,
) -> MarketplaceApplication
Create a new marketplace application.
| PARAMETER | DESCRIPTION |
|---|---|
|
Client to use for interacting with the Nextmv Cloud API.
TYPE:
|
|
The unique identifier of the partner that is creating the marketplace application.
TYPE:
|
|
The unique identifier of the reference application.
TYPE:
|
|
The title of the marketplace application.
TYPE:
|
|
The unique identifier of the marketplace application. If not provided, a safe ID will be generated. (default is None)
TYPE:
|
|
The description of the marketplace application. (default is None)
TYPE:
|
|
The categories of the marketplace application. (default is None) |
|
The features of the marketplace application. (default is None) |
| RETURNS | DESCRIPTION |
|---|---|
MarketplaceApplication
|
The newly created marketplace application. |
| RAISES | DESCRIPTION |
|---|---|
HTTPError
|
If the response status code is not 2xx. |
Source code in nextmv-py/nextmv/nextmv/cloud/marketplace.py
list_versions
¶
list_versions() -> list[MarketplaceVersion]
List all versions of the marketplace application.
| RETURNS | DESCRIPTION |
|---|---|
list[MarketplaceVersion]
|
A list of all versions of the marketplace application. |
| RAISES | DESCRIPTION |
|---|---|
HTTPError
|
If the response status code is not 2xx. |
Source code in nextmv-py/nextmv/nextmv/cloud/marketplace.py
new_version
¶
new_version(
change_log: list[str],
reference_version_id: str,
version_id: str | None = None,
) -> MarketplaceVersion
Create a new version of the marketplace application.
| PARAMETER | DESCRIPTION |
|---|---|
|
The changelog for the new version of the marketplace application. |
|
The unique identifier of the reference version.
TYPE:
|
|
The unique identifier of the new version. If not provided, a safe ID will be generated. (default is None)
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
MarketplaceVersion
|
The newly created marketplace application version. |
| RAISES | DESCRIPTION |
|---|---|
HTTPError
|
If the response status code is not 2xx. |
Source code in nextmv-py/nextmv/nextmv/cloud/marketplace.py
update
¶
update(
title: str | None = None,
description: str | None = None,
categories: list[str] | None = None,
features: list[str] | None = None,
state: MarketplaceState | None = None,
) -> MarketplaceApplication
Update the marketplace application.
| PARAMETER | DESCRIPTION |
|---|---|
|
The new title of the marketplace application. (default is None)
TYPE:
|
|
The new description of the marketplace application. (default is None)
TYPE:
|
|
The new categories of the marketplace application. (default is None) |
|
The new features of the marketplace application. (default is None) |
|
The new state of the marketplace application. (default is None)
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
MarketplaceApplication
|
The updated marketplace application. |
| RAISES | DESCRIPTION |
|---|---|
HTTPError
|
If the response status code is not 2xx. |
Source code in nextmv-py/nextmv/nextmv/cloud/marketplace.py
update_version
¶
update_version(
version_id: str, change_log: list[str]
) -> MarketplaceVersion
Update a version of the marketplace application.
| PARAMETER | DESCRIPTION |
|---|---|
|
The unique identifier of the marketplace application version to update.
TYPE:
|
|
The new changelog for the marketplace application version. |
| RETURNS | DESCRIPTION |
|---|---|
MarketplaceVersion
|
The updated marketplace application version. |
| RAISES | DESCRIPTION |
|---|---|
HTTPError
|
If the response status code is not 2xx. |
Source code in nextmv-py/nextmv/nextmv/cloud/marketplace.py
version
¶
version(version_id: str) -> MarketplaceVersion
Get a version of the marketplace application.
| PARAMETER | DESCRIPTION |
|---|---|
|
The unique identifier of the marketplace application version to retrieve.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
MarketplaceVersion
|
The marketplace application version with the specified ID. |
| RAISES | DESCRIPTION |
|---|---|
HTTPError
|
If the response status code is not 2xx. |
Source code in nextmv-py/nextmv/nextmv/cloud/marketplace.py
list_marketplace_applications
¶
list_marketplace_applications(
client: Client, partner_id: str | None = None
) -> list[MarketplaceApplication]
List all marketplace applications.
You can import the list_marketplace_applications function directly from cloud:
| PARAMETER | DESCRIPTION |
|---|---|
|
Client to use for interacting with the Nextmv Cloud API.
TYPE:
|
|
The unique identifier of the partner to filter marketplace applications by. If not provided, all marketplace applications will be listed. (default is None)
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[MarketplaceApplication]
|
A list of all marketplace applications. |
| RAISES | DESCRIPTION |
|---|---|
HTTPError
|
If the response status code is not 2xx. |
Source code in nextmv-py/nextmv/nextmv/cloud/marketplace.py
MarketplaceSubscription
¶
Bases: BaseModel
A marketplace subscription in Nextmv Cloud.
You can import the MarketplaceSubscription class directly from cloud:
| ATTRIBUTE | DESCRIPTION |
|---|---|
subscription_id |
The unique identifier of the marketplace subscription.
TYPE:
|
partner_name |
The name of the partner that created the marketplace application.
TYPE:
|
app_title |
The title of the marketplace application.
TYPE:
|
subscription_date |
The date and time when the marketplace subscription was created.
TYPE:
|
client |
Client to use for interacting with the Nextmv Cloud API. This is an SDK-specific attribute and it is not part of the API representation of a marketplace subscription.
TYPE:
|
endpoint |
Base endpoint for the subscription. This is an SDK-specific attribute and it is not part of the API representation of a marketplace subscription.
TYPE:
|
subscription_id
instance-attribute
¶
subscription_id: str
The unique identifier of the marketplace subscription.
partner_name
instance-attribute
¶
partner_name: str
The name of the partner that created the marketplace application.
subscription_date
class-attribute
instance-attribute
¶
subscription_date: str | None = None
The date and time when the marketplace subscription was created.
client
class-attribute
instance-attribute
¶
Client to use for interacting with the Nextmv Cloud API. This is an SDK-specific attribute and it is not part of the API representation of a marketplace subscription.
endpoint
class-attribute
instance-attribute
¶
endpoint: str = Field(
exclude=True,
default="v1/marketplace/subscriptions/{subscription_id}",
)
Base endpoint for the subscription. This is an SDK-specific attribute and it is not part of the API representation of a marketplace subscription.
model_post_init
¶
Initialize the endpoint attributes.
This method is called after the model is initialized.
Source code in nextmv-py/nextmv/nextmv/cloud/marketplace.py
get
classmethod
¶
get(
client: Client, subscription_id: str
) -> MarketplaceSubscription
Get a marketplace subscription by its ID.
| PARAMETER | DESCRIPTION |
|---|---|
|
Client to use for interacting with the Nextmv Cloud API.
TYPE:
|
|
The unique identifier of the marketplace subscription.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
MarketplaceSubscription
|
The marketplace subscription with the specified ID. |
Source code in nextmv-py/nextmv/nextmv/cloud/marketplace.py
new
classmethod
¶
new(
client: Client, subscription_id: str
) -> MarketplaceSubscription
Create a new marketplace subscription.
| PARAMETER | DESCRIPTION |
|---|---|
|
Client to use for interacting with the Nextmv Cloud API.
TYPE:
|
|
The unique identifier of the marketplace subscription.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
MarketplaceSubscription
|
The newly created marketplace subscription. |
Source code in nextmv-py/nextmv/nextmv/cloud/marketplace.py
delete
¶
Delete the marketplace subscription.
| RAISES | DESCRIPTION |
|---|---|
HTTPError
|
If the response status code is not 2xx. |
Source code in nextmv-py/nextmv/nextmv/cloud/marketplace.py
list_marketplace_subscriptions
¶
list_marketplace_subscriptions(
client: Client,
) -> list[MarketplaceSubscription]
List all marketplace subscriptions.
You can import the list_marketplace_subscriptions function directly from cloud:
| PARAMETER | DESCRIPTION |
|---|---|
|
Client to use for interacting with the Nextmv Cloud API.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[MarketplaceSubscription]
|
A list of all marketplace subscriptions. |