ContentPath
from skipcheck_tm1.values import ContentPathWhere an entry is in the contents tree: a root folder, then each folder's child by ID.
# Children by ID, which for most entries is the name plus a suffix for the kind
notes = ContentPath.applications().child("Planning").child("notes.txt.blob")
# Contents('Applications')/Contents('Planning')/Contents('notes.txt.blob')
Children are found by their ID, not their Name, though
$metadata keys entries by Name: TM1 (11.8) gives most entries an ID of
the name plus a suffix for its kind, such as notes.txt.blob for a document,
ibm.extr for a link and }ClientGroups.cube for a cube
reference. A folder's ID is its name. The ID is in the entry TM1 returns when it's
made. $metadata deprecates Entry.ID in schema 11.5.0, but TM1 11.8
still keys by it. Paths are immutable.
Members
__init__ constructor | |
root static | A root folder. |
applications static | The Applications folder, where applications are built. |
blobs static | The Blobs folder, holding the documents behind the document references in applications. |
child | A child of this folder. |
in_blobs | Whether this is in the Blobs folder, where documents themselves are. |
path | The OData path to the entry, such as Contents('Applications')/Contents('Planning'). |
__init__
constructor__init__(steps: tuple[tuple[str, ContentScope], ...])root
staticroot(id: str) -> ContentPathA root folder: Contents('id'), such as Applications.
applications
staticapplications() -> ContentPathThe Applications folder, where applications are built.
blobs
staticblobs() -> ContentPathThe Blobs folder, holding the documents behind the document references in applications.
child
child(id: str | Entry | None = None, entry: Entry | ContentScope | None = None, scope: ContentScope = ContentScope.PUBLIC) -> ContentPathA child of this folder: by its ID (child("notes.txt.blob")), or as TM1 returned it (child(entry), such as from ContentService.create: found by its ID, which $metadata deprecates but TM1 (11.8) still keys entries by). scope says which of the folder's collections holds it (child("x", ContentScope.PRIVATE) works too). A ValueError if an entry has no ID (it was selected away).
in_blobs
in_blobs() -> boolWhether this is in the Blobs folder, where documents themselves are.
path
path() -> ODataPathThe OData path to the entry, such as Contents('Applications')/Contents('Planning').