Skip to main content

enterprise_ai.packs.scaffold

Source: sdks/python/src/enterprise_ai/packs/scaffold.py. Back to the Python SDK reference index.

note

This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.

Model Domain​

Business domain offered by create_pack (banking, hr, finance...): titles, managed entity and source system.

Fields:

NameTypeRequiredDescription
slugstryesIdentifier of the domain, the domain argument of create_pack.
title_enstryesEnglish title of the domain.
title_frstryesFrench title of the domain.
entitystryesPlural identifier of the managed records, used in the scopes <name>.<entity>.read and .write, for example invoices.
entity_enstryesEnglish name of one record, for example invoice.
entity_frstryesFrench name of one record, for example facture.
systemstryesSource system of the simulated connector, for example erp or crm; replaces __SYSTEM__ in file names.
classificationstrnoData classification of the generated pack (default confidential, internal for it and marketing).

Functions​

template_files​

template_files() -> dict[str, Path]

Relative target path (with NAME, IDENT, SYSTEM tokens) -> template file.

This element takes no parameter.

Returns: dict[str, Path]. Dict relative target path (without .tmpl) to the .tmpl file of the bundled template.

create_pack​

create_pack(domain: str, directory: str | Path, name: str | None = None, owner: str = 'pack-team', version: str = '1.0.0', force: bool = False, lock: str | None = None) -> list[Path]

Write the pack files into directory. lock: content of requirements.txt (pinned with hashes).

NameTypeDefaultRequiredDescription
domainstryesSlug of a known Domain (banking, risk-compliance, legal, it, cybersecurity, sales-crm, marketing, procurement, support, document-intelligence, hr, finance).
directorystr | PathyesTarget folder; when it exists and is not empty, FileExistsError is raised unless force.
namestr | NoneNonenoPack name, lowercase letters, digits and dashes (at most 42 characters); default the domain slug.
ownerstr'pack-team'noOwner team written in the manifest (default pack-team).
versionstr'1.0.0'noVersion of the pack (default 1.0.0).
forceboolFalsenoWrite into a folder that is not empty, overwriting the template files (default False).
lockstr | NoneNonenoContent written to requirements.txt, optional.

Returns: list[Path]. Paths of the written files.

Raises: FileExistsError, ValueError.