Version Module¶
This section documents the version components of the Nextmv Cloud API.
version
¶
Manages application versions within the Nextmv Cloud API.
This module provides data models for representing application versions, their executables, and associated requirements. These models are used for interacting with version-related endpoints of the Nextmv Cloud API, allowing users to define, retrieve, and manage different versions of their decision applications.
CLASS | DESCRIPTION |
---|---|
VersionExecutableRequirements |
Defines the requirements for a version's executable, such as type and runtime. |
VersionExecutable |
Represents the executable artifact for a specific application version. |
Version |
Represents a version of an application, linking to its executable and metadata. |
Version
¶
Bases: BaseModel
A version of an application representing a code artifact or a compiled binary.
You can import the Version
class directly from cloud
:
This class encapsulates all details of a specific version of an application, including its metadata, associated executable, and timestamps.
PARAMETER | DESCRIPTION |
---|---|
|
Unique identifier for the version.
TYPE:
|
|
Identifier of the application to which this version belongs.
TYPE:
|
|
User-defined name for the version (e.g., "v1.0.0", "feature-branch-build").
TYPE:
|
|
A more detailed description of the version and its changes.
TYPE:
|
|
The executable artifact associated with this version.
TYPE:
|
|
Timestamp indicating when the version was created.
TYPE:
|
|
Timestamp indicating when the version was last updated.
TYPE:
|
Examples:
>>> from datetime import datetime
>>> reqs = VersionExecutableRequirements(executable_type="binary", runtime="java11")
>>> exe = VersionExecutable(
... id="exec-abc",
... user_email="[email protected]",
... uploaded_at=datetime.now(),
... requirements=reqs
... )
>>> version_info = Version(
... id="ver-xyz",
... application_id="app-123",
... name="Initial Release",
... description="First stable release of the model.",
... executable=exe,
... created_at=datetime.now(),
... updated_at=datetime.now()
... )
>>> print(version_info.name)
Initial Release
application_id
instance-attribute
¶
ID of the application that this is a version of.
VersionExecutable
¶
Bases: BaseModel
Executable for a version.
You can import the VersionExecutable
class directly from cloud
:
This class holds information about the actual executable file or image associated with an application version, including who uploaded it and when.
PARAMETER | DESCRIPTION |
---|---|
|
Unique identifier for the version executable.
TYPE:
|
|
Email of the user who uploaded the executable.
TYPE:
|
|
Timestamp indicating when the executable was uploaded.
TYPE:
|
|
The specific requirements for this executable. |
Examples:
>>> from datetime import datetime
>>> reqs = VersionExecutableRequirements(executable_type="docker", runtime="custom")
>>> executable = VersionExecutable(
... id="exec-123",
... user_email="[email protected]",
... uploaded_at=datetime.now(),
... requirements=reqs
... )
>>> print(executable.id)
exec-123
requirements
instance-attribute
¶
requirements: VersionExecutableRequirements
Requirements for the executable.
VersionExecutableRequirements
¶
Bases: BaseModel
Requirements for a version executable.
You can import the VersionExecutableRequirements
class directly from cloud
:
These requirements specify the environment and type of executable needed to run a particular version of an application.
PARAMETER | DESCRIPTION |
---|---|
|
The type of the executable (e.g., "binary", "docker").
TYPE:
|
|
The runtime environment for the executable (e.g., "go", "python").
TYPE:
|
Examples: