Skytap API object wrapping Skytap Groups.

This roughly translates to the Skytap API call of /v2/groups REST call, but gives us better access to the bits and pieces of the groups.

Accessing via command line

If accessed via the command line this will return the environments from Skytap in a JSON format:

python -m skytap.Groups

If you know the environment you want information on, you can also specify it directly. You can search by id or by a part of the environment name:

python -m skytap.Groups 12345
python -m skytap.Groups test

Accessing via Python

You can access the Skytap environments by the skytap.Groups object.


groups = skytap.Groups()
for g in groups:

Each group has many things you can do with it - see the skytap.models.Group object for actions you can take on an individual group.

On the full list of groups, you can also do a few other things:

  • add(): add a new group.
  • delete(): delete a group.

Environments can also perform any of the actions of other SkytapGroup objects. See the documentation on the skytap.models.SkytapGroup class for information there.

class skytap.Groups.Groups(json_list=None)

Bases: skytap.models.SkytapGroup.SkytapGroup

Set of Skytap groups.

Generally, access this through simply creating a skytap.Groups object.


groups = skytap.Groups()
for g in groups:
add(group, description='')

Add one group.

  • group (str) – The group name to add.
  • description (str) – The group description to add.

The new group id from Skytap.

Return type:



groups = skytap.Groups()
new_group = groups.add('muppets', 'felt covered friends')

Delete a group.


This is unrecoverable. Use with caution.

Parameters:group – The Group to delete.
Returns:True if group deleted.
Return type:bool
Raises:TypeError – if group is not a Group