scaleway.test.v1 package

Submodules

scaleway.test.v1.api module

class scaleway.test.v1.api.TestV1API(client: Client, *, bypass_validation: bool = False)

Bases: API

No Auth Service for end-to-end testing.

create_human(*, height: float, shoe_size: float, altitude_in_meter: int, altitude_in_millimeter: int, fingers_count: int, hair_count: int, is_happy: bool, name: str, eyes_color: Optional[EyeColors] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None) Human

Create a new human. :param height: :param shoe_size: :param altitude_in_meter: :param altitude_in_millimeter: :param fingers_count: :param hair_count: :param is_happy: :param name: :param eyes_color: :param organization_id: One-Of (‘project_identifier’): at most one of ‘project_id’, ‘organization_id’ could be set. :param project_id: One-Of (‘project_identifier’): at most one of ‘project_id’, ‘organization_id’ could be set. :return: Human

Usage:

result = api.create_human(
    height=3.14,
    shoe_size=3.14,
    altitude_in_meter=1,
    altitude_in_millimeter=1,
    fingers_count=1,
    hair_count=1,
    is_happy=False,
    name="example",
)
delete_human(*, human_id: str) Human

Delete an existing human. Delete the human associated with the given id. :param human_id: UUID of the human you want to delete. :return: Human

Usage:

result = api.delete_human(
    human_id="example",
)
get_human(*, human_id: str) Human

Get human details. Get the human details associated with the given id. :param human_id: UUID of the human you want to get. :return: Human

Usage:

result = api.get_human(
    human_id="example",
)
list_humans(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListHumansRequestOrderBy] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None) ListHumansResponse

List all your humans. :param page: :param page_size: :param order_by: :param organization_id: :param project_id: :return: ListHumansResponse

Usage:

result = api.list_humans()
list_humans_all(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListHumansRequestOrderBy] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None) List[Human]

List all your humans. :param page: :param page_size: :param order_by: :param organization_id: :param project_id: :return: List[Human]

Usage:

result = api.list_humans_all()
register(*, username: str) RegisterResponse

Register a user. Register a human and return a access-key and a secret-key that must be used in all other commands.

Hint: you can use other test commands by setting the SCW_SECRET_KEY env variable. :param username: :return: RegisterResponse

Usage:

result = api.register(
    username="example",
)
run_human(*, human_id: str) Human

Start a 1h running for the given human. Start a one hour running for the given human. :param human_id: UUID of the human you want to make run. :return: Human

Usage:

result = api.run_human(
    human_id="example",
)
smoke_human(*, human_id: str) Human

Make a human smoke. :param human_id: UUID of the human you want to make smoking. :return: Human :deprecated

Usage:

result = api.smoke_human(
    human_id="example",
)
update_human(*, human_id: str, height: Optional[float] = None, shoe_size: Optional[float] = None, altitude_in_meter: Optional[int] = None, altitude_in_millimeter: Optional[int] = None, fingers_count: Optional[int] = None, hair_count: Optional[int] = None, is_happy: Optional[bool] = None, eyes_color: Optional[EyeColors] = None, name: Optional[str] = None) Human

Update an existing human. Update the human associated with the given id. :param human_id: UUID of the human you want to update. :param height: Height of the human in meters. :param shoe_size: :param altitude_in_meter: :param altitude_in_millimeter: :param fingers_count: :param hair_count: :param is_happy: :param eyes_color: :param name: :return: Human

Usage:

result = api.update_human(
    human_id="example",
)
wait_for_human(*, human_id: str, options: Optional[WaitForOptions[Human, bool]] = None) Human

Get human details. Get the human details associated with the given id. :param human_id: UUID of the human you want to get. :return: Human

Usage:

result = api.get_human(
    human_id="example",
)

scaleway.test.v1.content module

scaleway.test.v1.content.HUMAN_TRANSIENT_STATUSES: List[HumanStatus] = [<HumanStatus.RUNNING: 'running'>]

Lists transient statutes of the enum HumanStatus.

scaleway.test.v1.marshalling module

scaleway.test.v1.marshalling.marshal_CreateHumanRequest(request: CreateHumanRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.test.v1.marshalling.marshal_RegisterRequest(request: RegisterRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.test.v1.marshalling.marshal_UpdateHumanRequest(request: UpdateHumanRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.test.v1.marshalling.unmarshal_Human(data: Any) Human
scaleway.test.v1.marshalling.unmarshal_ListHumansResponse(data: Any) ListHumansResponse
scaleway.test.v1.marshalling.unmarshal_RegisterResponse(data: Any) RegisterResponse

scaleway.test.v1.types module

class scaleway.test.v1.types.CreateHumanRequest(height: 'float', shoe_size: 'float', altitude_in_meter: 'int', altitude_in_millimeter: 'int', fingers_count: 'int', hair_count: 'int', is_happy: 'bool', name: 'str', eyes_color: 'Optional[EyeColors]', project_id: 'Optional[str]', organization_id: 'Optional[str]')

Bases: object

altitude_in_meter: int
altitude_in_millimeter: int
eyes_color: Optional[EyeColors]
fingers_count: int
hair_count: int
height: float
is_happy: bool
name: str
organization_id: Optional[str]
project_id: Optional[str]
shoe_size: float
class scaleway.test.v1.types.DeleteHumanRequest(human_id: 'str')

Bases: object

human_id: str

UUID of the human you want to delete.

class scaleway.test.v1.types.EyeColors(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

AMBER = 'amber'
BLUE = 'blue'
BROWN = 'brown'
GRAY = 'gray'
GREEN = 'green'
HAZEL = 'hazel'
RED = 'red'
UNKNOWN = 'unknown'
VIOLET = 'violet'
class scaleway.test.v1.types.GetHumanRequest(human_id: 'str')

Bases: object

human_id: str

UUID of the human you want to get.

class scaleway.test.v1.types.Human(id: 'str', organization_id: 'str', height: 'float', shoe_size: 'float', altitude_in_meter: 'int', altitude_in_millimeter: 'int', fingers_count: 'int', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', hair_count: 'int', is_happy: 'bool', eyes_color: 'EyeColors', status: 'HumanStatus', name: 'str', project_id: 'str')

Bases: object

altitude_in_meter: int
altitude_in_millimeter: int
created_at: Optional[datetime]
eyes_color: EyeColors
fingers_count: int
hair_count: int
height: float
id: str
is_happy: bool
name: str
organization_id: str
project_id: str
shoe_size: float
status: HumanStatus
updated_at: Optional[datetime]
class scaleway.test.v1.types.HumanStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

RUNNING = 'running'
STOPPED = 'stopped'
UNKNOWN = 'unknown'
class scaleway.test.v1.types.ListHumansRequest(page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListHumansRequestOrderBy]', organization_id: 'Optional[str]', project_id: 'Optional[str]')

Bases: object

order_by: Optional[ListHumansRequestOrderBy]
organization_id: Optional[str]
page: Optional[int]
page_size: Optional[int]
project_id: Optional[str]
class scaleway.test.v1.types.ListHumansRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
HEIGHT_ASC = 'height_asc'
HEIGHT_DESC = 'height_desc'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
class scaleway.test.v1.types.ListHumansResponse(total_count: 'int', humans: 'List[Human]')

Bases: object

humans: List[Human]
total_count: int
class scaleway.test.v1.types.RegisterRequest(username: 'str')

Bases: object

username: str
class scaleway.test.v1.types.RegisterResponse(secret_key: 'str', access_key: 'str')

Bases: object

access_key: str
secret_key: str
class scaleway.test.v1.types.RunHumanRequest(human_id: 'str')

Bases: object

human_id: str

UUID of the human you want to make run.

class scaleway.test.v1.types.SmokeHumanRequest(human_id: 'str')

Bases: object

human_id: str

UUID of the human you want to make smoking.

class scaleway.test.v1.types.UpdateHumanRequest(human_id: 'str', height: 'Optional[float]', shoe_size: 'Optional[float]', altitude_in_meter: 'Optional[int]', altitude_in_millimeter: 'Optional[int]', fingers_count: 'Optional[int]', hair_count: 'Optional[int]', is_happy: 'Optional[bool]', eyes_color: 'Optional[EyeColors]', name: 'Optional[str]')

Bases: object

altitude_in_meter: Optional[int]
altitude_in_millimeter: Optional[int]
eyes_color: Optional[EyeColors]
fingers_count: Optional[int]
hair_count: Optional[int]
height: Optional[float]

Height of the human in meters.

human_id: str

UUID of the human you want to update.

is_happy: Optional[bool]
name: Optional[str]
shoe_size: Optional[float]

Module contents

class scaleway.test.v1.CreateHumanRequest(height: 'float', shoe_size: 'float', altitude_in_meter: 'int', altitude_in_millimeter: 'int', fingers_count: 'int', hair_count: 'int', is_happy: 'bool', name: 'str', eyes_color: 'Optional[EyeColors]', project_id: 'Optional[str]', organization_id: 'Optional[str]')

Bases: object

altitude_in_meter: int
altitude_in_millimeter: int
eyes_color: Optional[EyeColors]
fingers_count: int
hair_count: int
height: float
is_happy: bool
name: str
organization_id: Optional[str]
project_id: Optional[str]
shoe_size: float
class scaleway.test.v1.DeleteHumanRequest(human_id: 'str')

Bases: object

human_id: str

UUID of the human you want to delete.

class scaleway.test.v1.EyeColors(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

AMBER = 'amber'
BLUE = 'blue'
BROWN = 'brown'
GRAY = 'gray'
GREEN = 'green'
HAZEL = 'hazel'
RED = 'red'
UNKNOWN = 'unknown'
VIOLET = 'violet'
class scaleway.test.v1.GetHumanRequest(human_id: 'str')

Bases: object

human_id: str

UUID of the human you want to get.

class scaleway.test.v1.Human(id: 'str', organization_id: 'str', height: 'float', shoe_size: 'float', altitude_in_meter: 'int', altitude_in_millimeter: 'int', fingers_count: 'int', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', hair_count: 'int', is_happy: 'bool', eyes_color: 'EyeColors', status: 'HumanStatus', name: 'str', project_id: 'str')

Bases: object

altitude_in_meter: int
altitude_in_millimeter: int
created_at: Optional[datetime]
eyes_color: EyeColors
fingers_count: int
hair_count: int
height: float
id: str
is_happy: bool
name: str
organization_id: str
project_id: str
shoe_size: float
status: HumanStatus
updated_at: Optional[datetime]
class scaleway.test.v1.HumanStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

RUNNING = 'running'
STOPPED = 'stopped'
UNKNOWN = 'unknown'
class scaleway.test.v1.ListHumansRequest(page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListHumansRequestOrderBy]', organization_id: 'Optional[str]', project_id: 'Optional[str]')

Bases: object

order_by: Optional[ListHumansRequestOrderBy]
organization_id: Optional[str]
page: Optional[int]
page_size: Optional[int]
project_id: Optional[str]
class scaleway.test.v1.ListHumansRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
HEIGHT_ASC = 'height_asc'
HEIGHT_DESC = 'height_desc'
UPDATED_AT_ASC = 'updated_at_asc'
UPDATED_AT_DESC = 'updated_at_desc'
class scaleway.test.v1.ListHumansResponse(total_count: 'int', humans: 'List[Human]')

Bases: object

humans: List[Human]
total_count: int
class scaleway.test.v1.RegisterRequest(username: 'str')

Bases: object

username: str
class scaleway.test.v1.RegisterResponse(secret_key: 'str', access_key: 'str')

Bases: object

access_key: str
secret_key: str
class scaleway.test.v1.RunHumanRequest(human_id: 'str')

Bases: object

human_id: str

UUID of the human you want to make run.

class scaleway.test.v1.SmokeHumanRequest(human_id: 'str')

Bases: object

human_id: str

UUID of the human you want to make smoking.

class scaleway.test.v1.TestV1API(client: Client, *, bypass_validation: bool = False)

Bases: API

No Auth Service for end-to-end testing.

create_human(*, height: float, shoe_size: float, altitude_in_meter: int, altitude_in_millimeter: int, fingers_count: int, hair_count: int, is_happy: bool, name: str, eyes_color: Optional[EyeColors] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None) Human

Create a new human. :param height: :param shoe_size: :param altitude_in_meter: :param altitude_in_millimeter: :param fingers_count: :param hair_count: :param is_happy: :param name: :param eyes_color: :param organization_id: One-Of (‘project_identifier’): at most one of ‘project_id’, ‘organization_id’ could be set. :param project_id: One-Of (‘project_identifier’): at most one of ‘project_id’, ‘organization_id’ could be set. :return: Human

Usage:

result = api.create_human(
    height=3.14,
    shoe_size=3.14,
    altitude_in_meter=1,
    altitude_in_millimeter=1,
    fingers_count=1,
    hair_count=1,
    is_happy=False,
    name="example",
)
delete_human(*, human_id: str) Human

Delete an existing human. Delete the human associated with the given id. :param human_id: UUID of the human you want to delete. :return: Human

Usage:

result = api.delete_human(
    human_id="example",
)
get_human(*, human_id: str) Human

Get human details. Get the human details associated with the given id. :param human_id: UUID of the human you want to get. :return: Human

Usage:

result = api.get_human(
    human_id="example",
)
list_humans(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListHumansRequestOrderBy] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None) ListHumansResponse

List all your humans. :param page: :param page_size: :param order_by: :param organization_id: :param project_id: :return: ListHumansResponse

Usage:

result = api.list_humans()
list_humans_all(*, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListHumansRequestOrderBy] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None) List[Human]

List all your humans. :param page: :param page_size: :param order_by: :param organization_id: :param project_id: :return: List[Human]

Usage:

result = api.list_humans_all()
register(*, username: str) RegisterResponse

Register a user. Register a human and return a access-key and a secret-key that must be used in all other commands.

Hint: you can use other test commands by setting the SCW_SECRET_KEY env variable. :param username: :return: RegisterResponse

Usage:

result = api.register(
    username="example",
)
run_human(*, human_id: str) Human

Start a 1h running for the given human. Start a one hour running for the given human. :param human_id: UUID of the human you want to make run. :return: Human

Usage:

result = api.run_human(
    human_id="example",
)
smoke_human(*, human_id: str) Human

Make a human smoke. :param human_id: UUID of the human you want to make smoking. :return: Human :deprecated

Usage:

result = api.smoke_human(
    human_id="example",
)
update_human(*, human_id: str, height: Optional[float] = None, shoe_size: Optional[float] = None, altitude_in_meter: Optional[int] = None, altitude_in_millimeter: Optional[int] = None, fingers_count: Optional[int] = None, hair_count: Optional[int] = None, is_happy: Optional[bool] = None, eyes_color: Optional[EyeColors] = None, name: Optional[str] = None) Human

Update an existing human. Update the human associated with the given id. :param human_id: UUID of the human you want to update. :param height: Height of the human in meters. :param shoe_size: :param altitude_in_meter: :param altitude_in_millimeter: :param fingers_count: :param hair_count: :param is_happy: :param eyes_color: :param name: :return: Human

Usage:

result = api.update_human(
    human_id="example",
)
wait_for_human(*, human_id: str, options: Optional[WaitForOptions[Human, bool]] = None) Human

Get human details. Get the human details associated with the given id. :param human_id: UUID of the human you want to get. :return: Human

Usage:

result = api.get_human(
    human_id="example",
)
class scaleway.test.v1.UpdateHumanRequest(human_id: 'str', height: 'Optional[float]', shoe_size: 'Optional[float]', altitude_in_meter: 'Optional[int]', altitude_in_millimeter: 'Optional[int]', fingers_count: 'Optional[int]', hair_count: 'Optional[int]', is_happy: 'Optional[bool]', eyes_color: 'Optional[EyeColors]', name: 'Optional[str]')

Bases: object

altitude_in_meter: Optional[int]
altitude_in_millimeter: Optional[int]
eyes_color: Optional[EyeColors]
fingers_count: Optional[int]
hair_count: Optional[int]
height: Optional[float]

Height of the human in meters.

human_id: str

UUID of the human you want to update.

is_happy: Optional[bool]
name: Optional[str]
shoe_size: Optional[float]