Common types

Describe groups of objects, sizes, labels, and dates with types that many others use.

Group

class creator_studio_doc_format.core.Group(*, preset_identifier='', identifier=None, geometry=None, aspect_ratio_locked=True, description=None, title=None, title_is_positioned_on_top=True, caption=None, children, **extra_data)[source]

An ordered set of objects that behave as one when selected, moved, or transformed.

The group’s position and size are those of the smallest rectangle enclosing its children, so the reader uses only the rotation and flip from its geometry.

field identifier : str | None = None

An identifier for this object that other objects use to refer to it. This identifier must be unique across the whole document.

field geometry : Geometry | None = None

The object’s position and size. If this value is absent, Keynote places the object automatically, with a default position and size for its kind.

field aspect_ratio_locked : bool = True

Whether the group’s width-to-height ratio is locked when the group is resized. The lock doesn’t constrain the geometry property. The default is true, and a group behaves as locked regardless of this value if any object inside it has a locked aspect ratio.

field description : str | None = None

The accessibility description for the object, read aloud by assistive technologies such as VoiceOver.

field title : Label | None = None

The object’s title.

field title_is_positioned_on_top : bool = True

When true, the title appears above the object; when false, the title appears below the object, above the caption if there is one. Defaults to true. Keynote ignores this when the object has none, or when it’s hidden with Label.is_visible set to false; Keynote places a hidden title above the object, where it appears when it shows again.

field caption : Label | None = None

The object’s caption, which Keynote always places below the object. If a caption is off, you still write it out with Label.is_visible set to false, so having a value doesn’t mean the caption shows.

field children : list[CanvasObject] [Required]

The objects in this group, in order from rearmost to frontmost; at least one is required. A child that can’t be read is dropped and its siblings are kept. A group with a single child is written back as that single object, and a group with no valid children is skipped. On a slide or slide layout, a group that’s left with a single child when it’s read is ungrouped too, along with every group that contains it. A group removed this way, on writing or on reading, loses its own title, caption, description, and aspect_ratio_locked.

Constraints:
  • min_length = 1

Size

class creator_studio_doc_format.core.Size(*, preset_identifier='', width, height, **extra_data)[source]

A width and height in whichever coordinate space the property using it defines.

A size is always unrotated; Geometry covers how an object’s size relates to its rotation and its position.

field width : float [Required]

The width, in points.

field height : float [Required]

The height, in points.

Label

class creator_studio_doc_format.core.Label(*, preset_identifier='', layout_properties=None, paragraph_properties=None, text=None, is_visible=True, **extra_data)[source]

Styled text that the reader uses as a title or caption on an object.

field layout_properties : LayoutProperties | None = None

The layout overrides, such as insets and columns, for the label’s text. If it’s absent, the theme’s text layout settings are used.

field paragraph_properties : ParagraphProperties | None = None

The paragraph-level style, such as alignment and spacing, for the label’s text. If it’s absent, the theme’s paragraph style is used.

field text : Text | None = None

The text of the title or caption.

field is_visible : bool = True

Whether the title or caption is visible. Defaults to true; when false, the title or caption is hidden but its text and styling are preserved.

Date

class creator_studio_doc_format.core.Date(*, preset_identifier='', time_interval_since1970, **extra_data)[source]

An absolute point in time.

Its time zone is implicitly UTC, and the reader determines the locale it’s displayed in.

field time_interval_since1970 : float [Required]

The number of seconds, with fractional precision, since 1970-01-01 00:00:00 UTC. A negative value represents a date before 1970.