Skip to content

space

Module to interact with spaces.

This module contains class to interact with a space in EMS Studio.

Typical usage example:

```python
space = studio.get_space(space_id)
space.name = "NEW_NAME"
space.update()
space.delete()
```

Space

Bases: SpaceTransport

Space object to interact with space specific studio endpoints.

permissions class-attribute instance-attribute

permissions = Field(alias='permissions')

icon_reference class-attribute instance-attribute

icon_reference = Field(alias='iconReference')

creation_date class-attribute instance-attribute

creation_date = Field(alias='creationDate')

change_date class-attribute instance-attribute

change_date = Field(alias='changeDate')

object_id class-attribute instance-attribute

object_id = Field(alias='objectId')

client class-attribute instance-attribute

client = Field(..., exclude=True)

id instance-attribute

id

Id of space.

name instance-attribute

name

Name of space.

from_transport classmethod

from_transport(client, space_transport)

Creates high-level space object from given SpaceTransport.

Parameters:

  • client (Client) –

    Client to use to make API calls for given space.

  • space_transport (SpaceTransport) –

    SpaceTransport object containing properties of space.

Returns:

  • Space

    A Space object with properties from transport and given client.

update

update()

Pushes local changes of space to EMS and updates properties with response from EMS.

sync

sync()

Syncs space properties with EMS.

delete

delete()

Deletes space.

create_package

create_package(name, key=None, **kwargs)

Creates new package with name in given space.

Parameters:

  • name (str) –

    Name of new package.

  • key (Optional[str], default: None ) –

    Key of new package. Defaults to name.

  • **kwargs (Any, default: {} ) –

    Additional parameters set for SaveContentNodeTransport object.

Returns:

  • Package

    A Package object for newly created package.

Examples:

Create a package in space:

space = c.studio.get_space("<space_id>")
package = space.create_package(name="test-package")

get_package

get_package(id_)

Gets package with given id.

Parameters:

  • id_ (str) –

    Id of package.

Returns:

  • ContentNode

    A Package object for package with given id.

Raises:

get_packages

get_packages()

Gets all packages of given space.

Returns: