netunicorn.base.environment_definitions.BuildContext

class BuildContext(python_version=<factory>, cloudpickle_version=<factory>)[source]

Bases: object

Stores a build context for a Deployment, such as Python version or cloudpickle version, used during deployment

Parameters:
  • python_version (str, default: <factory>) – User’s Python version

  • cloudpickle_version (Optional[str], default: <factory>) – User’s cloudpickle version

Attributes

python_version

User's Python version

cloudpickle_version

User's cloudpickle version

Methods

from_json

Creates BuildContext from JSON representation.

python_version: str[source]

User’s Python version

cloudpickle_version: Optional[str][source]

User’s cloudpickle version

classmethod from_json(data)[source]

Creates BuildContext from JSON representation.

Parameters:

data (BuildContextRepresentation) – JSON representation of BuildContext

Returns:

BuildContext – Deserialized BuildContext