Python client API
Generated from packages/sketchforge-py/src/sketchforge3d/__init__.py by node scripts/docs/generate-package-references.mjs. Do not edit this file directly.
The exported names below are the supported import surface. Signatures and summaries are read from the installed package source; details and examples are in the Python package README.
ALIGN_AXES
ALIGN_AXES = ('x', 'y', 'z')
ALIGN_TARGETS
ALIGN_TARGETS = ('min', 'center', 'max')
API_ERROR_CODES
Align(transport: 'Transport') -> 'None'
Puts one edge or one centre of every named shape on the same coordinate.
AlignResult(moved: 'int', axis: 'str', target: 'str', anchor_id: 'Optional[str]', shapes: 'List[ShapeSummary]', revision: 'int') -> None
What an alignment did.
BASE_URL_ENV
BASE_URL_ENV = 'SKETCHFORGE_URL'
BakedMirrorResult(moved: 'int', axis: 'str', shapes: 'List[ShapeSummary]', revision: 'int') -> None
Exact reflection of selected parameter-built solids across their shared bounds plane.
BooleanCutResult(shape: 'ShapeSummary', triangles: 'int', revision: 'int') -> None
Booleans(transport: 'Transport') -> 'None'
Subtracts one or more cutter shapes from one or more solids.
BoxShapeRequest
class BoxShapeRequest:
name: str
color: str
x: float
z: float
elevation: float
width: float
depth: float
height: float
size: float
rotation: float
rotationX: float
rotationZ: float
hole: bool
taperTopWidth: float
taperTopDepth: float
taperBottomWidth: float
taperBottomDepth: float
kind: Literal['box']ConeShapeRequest
class ConeShapeRequest:
name: str
color: str
x: float
z: float
elevation: float
width: float
depth: float
height: float
size: float
rotation: float
rotationX: float
rotationZ: float
hole: bool
taperTopWidth: float
taperTopDepth: float
taperBottomWidth: float
taperBottomDepth: float
kind: Literal['cone']
sides: int
topRadius: float
baseRadius: floatCubeShapeRequest
class CubeShapeRequest:
name: str
color: str
x: float
z: float
elevation: float
width: float
depth: float
height: float
size: float
rotation: float
rotationX: float
rotationZ: float
hole: bool
taperTopWidth: float
taperTopDepth: float
taperBottomWidth: float
taperBottomDepth: float
kind: Literal['cube']CylinderShapeRequest
class CylinderShapeRequest:
name: str
color: str
x: float
z: float
elevation: float
width: float
depth: float
height: float
size: float
rotation: float
rotationX: float
rotationZ: float
hole: bool
taperTopWidth: float
taperTopDepth: float
taperBottomWidth: float
taperBottomDepth: float
kind: Literal['cylinder']
sides: intDEFAULT_BASE_URL
DEFAULT_BASE_URL = 'http://127.0.0.1:3000'
DISTRIBUTE_SPACINGS
DISTRIBUTE_SPACINGS = ('gaps', 'centers')
Distribute(transport: 'Transport') -> 'None'
Spreads three or more shapes evenly along an axis.
DistributeResult(moved: 'int', axis: 'str', spacing: 'str', shapes: 'List[ShapeSummary]', revision: 'int') -> None
What a distribution did, and along which axis it decided to work.
EXPORT_SECTION_PLANES
EXPORT_SECTION_PLANES = ('xy', 'xz', 'yz')
EXPORT_VIEWS
EXPORT_VIEWS = ('multiview', 'front', 'back', 'top', 'bottom', 'left', 'right', 'iso')
EdgeSummary(index: 'int', length: 'float', curve_type: 'str', midpoint: 'EdgeMidpoint', filletable: 'bool') -> None
Edges(transport: 'Transport') -> 'None'
Explosions(transport: 'Transport') -> 'None'
Explodes an imported STEP assembly into its component solids.
ExportFormat
ExportResult(format: 'ExportFormat', filename: 'str', mime_type: 'str', data: 'bytes', shape_count: 'int', exported_count: 'Optional[int]' = None, skipped: 'List[Dict[str, Any]]' = ...) -> None
ExportSection
class ExportSection:
plane: Literal['xy', 'xz', 'yz']
offset: floatExportSectionPlane
ExportView
Exports(transport: 'Transport') -> 'None'
Exports a server-stored project or selected shapes to a local file format.
FACE_DIRECTIONS
FACE_DIRECTIONS = ('top', 'bottom', 'left', 'right', 'front', 'back')
FaceSummary(id: 'Optional[str]', index: 'int', surface_type: 'str', area: 'float', centroid: 'Vector3', normal: 'Optional[Vector3]', facing: 'Optional[str]') -> None
Faces(transport: 'Transport') -> 'None'
GearShapeRequest
class GearShapeRequest:
name: str
color: str
x: float
z: float
elevation: float
width: float
depth: float
height: float
size: float
rotation: float
rotationX: float
rotationZ: float
hole: bool
taperTopWidth: float
taperTopDepth: float
taperBottomWidth: float
taperBottomDepth: float
kind: Literal['gear']
teeth: int
toothSize: float
toothWidth: float
centerHoleSize: float
gearType: str
helixAngle: floatGroups(transport: 'Transport') -> 'None'
Groups shapes, including subtracting members marked as holes.
HalfSphereShapeRequest
class HalfSphereShapeRequest:
name: str
color: str
x: float
z: float
elevation: float
width: float
depth: float
height: float
size: float
rotation: float
rotationX: float
rotationZ: float
hole: bool
taperTopWidth: float
taperTopDepth: float
taperBottomWidth: float
taperBottomDepth: float
kind: Literal['halfSphere']
steps: intIMPORTABLE_MESH_FORMATS
IMPORTABLE_MESH_FORMATS = ('stl', 'obj', 'svg')
IcosahedronShapeRequest
class IcosahedronShapeRequest:
name: str
color: str
x: float
z: float
elevation: float
width: float
depth: float
height: float
size: float
rotation: float
rotationX: float
rotationZ: float
hole: bool
taperTopWidth: float
taperTopDepth: float
taperBottomWidth: float
taperBottomDepth: float
kind: Literal['icosahedron']Imports(transport: 'Transport') -> 'None'
Adds the model a file describes, and keeps the file with the project.
InterferencePair(a: 'Mapping[str, str]', b: 'Mapping[str, str]', gap: 'float', overlap_volume: 'float', precision: "Literal['exact', 'tessellated']") -> None
InterferenceReport(shapes_checked: 'int', candidate_pairs_checked: 'int', clearance: 'float', method: 'str', pairs: 'List[InterferencePair]') -> None
ListPage(items: 'List[TPageItem]', next_cursor: 'Optional[str]') -> None
LoftShapeRequest
class LoftShapeRequest:
name: str
color: str
x: float
z: float
elevation: float
width: float
depth: float
height: float
size: float
rotation: float
rotationX: float
rotationZ: float
hole: bool
taperTopWidth: float
taperTopDepth: float
taperBottomWidth: float
taperBottomDepth: float
kind: Literal['loft']
loftBottomShape: str
loftTopShape: str
loftTopWidth: float
loftTopDepth: float
loftBottomRotation: float
loftTopRotation: float
loftSegments: int
loftLayers: intMAX_PATTERN_COUNT
MAX_PATTERN_COUNT = 200
MAX_SHAPES_PER_REQUEST
MAX_SHAPES_PER_REQUEST = 200
MEASUREMENT_ANGLE_UNAVAILABLE_CODES
MEASUREMENT_ANGLE_UNAVAILABLE_CODES = ('notPlanar', 'degenerateNormal')
MEASUREMENT_END_ENTITIES
MEASUREMENT_END_ENTITIES = ('edge', 'face', 'shape')
MEASUREMENT_ENTITIES
MEASUREMENT_ENTITIES = ('edge', 'face')
MEASUREMENT_RADIUS_UNAVAILABLE_CODES
MEASUREMENT_RADIUS_UNAVAILABLE_CODES = ('notCircular', 'ellipseHasNoSingleRadius', 'degenerateCurve', 'notCurved', 'radiusVariesOverSurface', 'radiusNotReportedByKernel', 'degenerateSurface')
MEASUREMENT_UNAVAILABLE_CODES
MEASUREMENT_UNAVAILABLE_CODES = ('notCircular', 'ellipseHasNoSingleRadius', 'degenerateCurve', 'notCurved', 'radiusVariesOverSurface', 'radiusNotReportedByKernel', 'degenerateSurface', 'notPlanar', 'degenerateNormal')
MIN_PATTERN_COUNT
MIN_PATTERN_COUNT = 2
Macro(name: 'str', run: 'Callable[[MacroContext], Any]', project: 'Union[str, Sequence[str]]' = 'fresh', description: 'str' = '', params: 'Dict[str, MacroParameterValue]' = ...) -> None
MacroContext(client: 'SketchForgeClient', project: 'ProjectHandle', params: 'Dict[str, MacroParameterValue]', layout: 'ModuleType', log: 'Callable[[str], None]') -> None
MacroRunReport(macro: 'str', project_id: 'str', project_created: 'bool', shapes_cleared: 'int', shape_count: 'int', duration_ms: 'int', result: 'Any') -> None
MeasurementPair(distance: 'float', angle_degrees: 'Optional[float]', angle_unavailable: 'Optional[str]') -> None
MeasurementSummary(entity: 'str', index: 'int', geometry_type: 'str', length: 'Optional[float]', area: 'Optional[float]', radius: 'Optional[float]', diameter: 'Optional[float]', sweep_degrees: 'Optional[float]', radius_unavailable: 'Optional[str]') -> None
One edge or face, measured from the exact B-rep rather than the mesh.
Measurements(transport: 'Transport') -> 'None'
MeshImportResult(shape: 'ShapeSummary', triangles: 'int', revision: 'int') -> None
TreatmentResult(shape: 'ShapeSummary', triangles: 'int', revision: 'int')
Mirrors(transport: 'Transport') -> 'None'
Exact CAD mirror operations for parameter-built solids.
MissingConfigurationError
The environment does not say how to reach the server.
PARAMETRIC_SHAPE_KINDS
PARAMETRIC_SHAPE_KINDS = ('box', 'cube', 'cylinder', 'cone', 'sphere', 'halfSphere', 'torus', 'tube', 'ring', 'polygon', 'pyramid', 'roof', 'roundRoof', 'wedge', 'icosahedron', 'text', 'loft', 'gear')
PATTERN_KINDS
PATTERN_KINDS = ('linear', 'circular')
PROJECT_ENV
PROJECT_ENV = 'SKETCHFORGE_PROJECT_ID'
PROJECT_MODES
PROJECT_MODES = ('fresh', 'replace', 'reuse', 'target')
Parts(transport: 'Transport') -> 'None'
Separates a cut or grouped shape into its independent bodies.
PatternResult(created: 'int', kind: 'str', shapes: 'List[ShapeSummary]', revision: 'int') -> None
The copies a pattern added. created excludes the original.
Patterns(transport: 'Transport') -> 'None'
Repeats shapes in a row or around a ring, adding the copies.
Point2(x: 'float', z: 'float') -> None
PolygonShapeRequest
class PolygonShapeRequest:
name: str
color: str
x: float
z: float
elevation: float
width: float
depth: float
height: float
size: float
rotation: float
rotationX: float
rotationZ: float
hole: bool
taperTopWidth: float
taperTopDepth: float
taperBottomWidth: float
taperBottomDepth: float
kind: Literal['polygon']ProjectDetail(id: 'str', name: 'str', created_at: 'int', snap_grid: 'Dict[str, Any]', workspace: 'Dict[str, Any]', shapes: 'List[ShapeSummary]') -> None
ProjectHandle(client: 'SketchForgeClient', project_id: 'str') -> 'None'
ProjectSummary(id: 'str', name: 'str', shapes: 'int', revision: 'int', updated_at: 'int', package_bytes: 'int') -> None
Projects(transport: 'Transport') -> 'None'
Properties(transport: 'Transport') -> 'None'
PyramidShapeRequest
class PyramidShapeRequest:
name: str
color: str
x: float
z: float
elevation: float
width: float
depth: float
height: float
size: float
rotation: float
rotationX: float
rotationZ: float
hole: bool
taperTopWidth: float
taperTopDepth: float
taperBottomWidth: float
taperBottomDepth: float
kind: Literal['pyramid']
sides: intREQUESTABLE_SHAPE_KINDS
REQUESTABLE_SHAPE_KINDS = ('box', 'cube', 'cylinder', 'cone', 'sphere', 'halfSphere', 'torus', 'tube', 'ring', 'polygon', 'pyramid', 'roof', 'roundRoof', 'wedge', 'icosahedron', 'text', 'loft', 'gear', 'revolve', 'thread', 'sketchSweep')
RequestableShapeKind
RevolveShapeRequest
class RevolveShapeRequest:
name: str
color: str
x: float
z: float
elevation: float
width: float
depth: float
height: float
size: float
rotation: float
rotationX: float
rotationZ: float
hole: bool
taperTopWidth: float
taperTopDepth: float
taperBottomWidth: float
taperBottomDepth: float
kind: Literal['revolve']
profile: Sequence[Sequence[float]]
pitch: float
turns: float
startAngle: float
sweepAngle: float
sides: int
quality: int
coreRadius: float
outline: Sequence[Sequence[float]]
revolve: Mapping[str, Any]RingShapeRequest
class RingShapeRequest:
name: str
color: str
x: float
z: float
elevation: float
width: float
depth: float
height: float
size: float
rotation: float
rotationX: float
rotationZ: float
hole: bool
taperTopWidth: float
taperTopDepth: float
taperBottomWidth: float
taperBottomDepth: float
kind: Literal['ring']
bevel: floatRoofShapeRequest
class RoofShapeRequest:
name: str
color: str
x: float
z: float
elevation: float
width: float
depth: float
height: float
size: float
rotation: float
rotationX: float
rotationZ: float
hole: bool
taperTopWidth: float
taperTopDepth: float
taperBottomWidth: float
taperBottomDepth: float
kind: Literal['roof']RoundRoofShapeRequest
class RoundRoofShapeRequest:
name: str
color: str
x: float
z: float
elevation: float
width: float
depth: float
height: float
size: float
rotation: float
rotationX: float
rotationZ: float
hole: bool
taperTopWidth: float
taperTopDepth: float
taperBottomWidth: float
taperBottomDepth: float
kind: Literal['roundRoof']
sides: intSHAPE_DESCRIPTION_FIELDS
SHAPE_DESCRIPTION_FIELDS = ('id', 'kind', 'requestKind', 'sketchOperation', 'groupedCount', 'stepAssembly', 'stepComponent')
SHAPE_KINDS
SHAPE_KINDS = ('box', 'cube', 'cylinder', 'cone', 'sphere', 'halfSphere', 'torus', 'tube', 'ring', 'polygon', 'pyramid', 'roof', 'roundRoof', 'wedge', 'icosahedron', 'text', 'loft', 'gear', 'revolve', 'thread', 'sketchSweep')
SHAPE_PARAMETER_NAMES
ShapeCollectionResult(shapes: 'List[ShapeSummary]', revision: 'int') -> None
ShapeGeometryProvenance(source: "Literal['parametric', 'brep', 'mesh']", precision: "Literal['exact', 'tessellated']") -> None
ShapeOperationResult(shape: 'ShapeSummary', revision: 'int') -> None
ShapeProperties(volume: 'float', area: 'float', center_of_mass: 'Mapping[str, float]', bbox: 'Mapping[str, float]', is_valid: 'bool', provenance: 'ShapeGeometryProvenance') -> None
ShapeSpec
ShapeSummary(id: 'str', name: 'str', kind: 'str', color: 'str', hole: 'bool', locked: 'bool', hidden: 'bool', x: 'float', z: 'float', elevation: 'float', width: 'float', depth: 'float', height: 'float', rotation: 'float', rotation_x: 'float', rotation_z: 'float', request_kind: 'Optional[str]' = None, sketch_operation: 'Optional[str]' = None, sketch_source_id: 'Optional[str]' = None, sketch_profile: 'Optional[Dict[str, Any]]' = None, face_draft: 'Optional[Dict[str, Any]]' = None, parameters: 'Dict[str, Any]' = ..., revolve: 'Optional[Dict[str, Any]]' = None, profile: 'Optional[List[List[float]]]' = None, face_ids: 'List[str]' = ..., face_colors: 'Dict[str, str]' = ..., step_assembly: 'List[StepAssemblyNode]' = ..., step_component: 'Optional[StepComponent]' = None, extra: 'Dict[str, Any]' = ...) -> None
A shape as the server reports it.
ShapeWriteResult(shapes: 'List[ShapeSummary]', revision: 'int') -> None
Shapes(transport: 'Transport') -> 'None'
Shell(transport: 'Transport') -> 'None'
ShellResult(shape: 'ShapeSummary', triangles: 'int', revision: 'int') -> None
TreatmentResult(shape: 'ShapeSummary', triangles: 'int', revision: 'int')
SketchForgeApiError(method: 'str', url: 'str', status: 'int', detail: 'Optional[str]' = None, body: 'Any' = None, code: 'Optional[str]' = None) -> 'None'
The server answered, and refused.
SketchForgeClient(base_url: 'str', token: 'str', timeout: 'float' = 60.0, retry_on_busy: 'int' = 4, headers: 'Optional[Mapping[str, str]]' = None, opener: 'Optional[Any]' = None, expected_revision: 'Optional[Union[int, str]]' = None) -> 'None'
SketchForgeError
Anything this library raises on its own behalf.
SketchForgeTransportError(method: 'str', url: 'str', cause: 'BaseException') -> 'None'
The request never reached the server, or never came back.
SketchSweepPoint
class SketchSweepPoint:
id: str
x: float
z: float
sweepDepth: float
sweepRole: Literal['section', 'spine']
handleIn: Mapping[str, float]
handleOut: Mapping[str, float]
mode: Literal['corner', 'smooth', 'split']SketchSweepProfile
class SketchSweepProfile:
points: Sequence[sketchforge3d.types.SketchSweepPoint]
segments: Sequence[sketchforge3d.types.SketchSweepSegment]
constraints: Sequence[Union[sketchforge3d.types.SketchFixedConstraint, sketchforge3d.types.SketchCoincidentConstraint, sketchforge3d.types.SketchAxisConstraint, sketchforge3d.types.SketchSegmentPairConstraint, sketchforge3d.types.SketchAngleConstraint, sketchforge3d.types.SketchSymmetryConstraint, sketchforge3d.types.SketchDistanceConstraint, sketchforge3d.types.SketchRadiusConstraint]]
sweepFrames: Mapping[str, Any]SketchSweepSegment
class SketchSweepSegment:
id: str
startId: str
endId: str
kind: Literal['line', 'bezier', 'smooth']SketchSweepShapeRequest
class SketchSweepShapeRequest:
name: str
color: str
x: float
z: float
elevation: float
width: float
depth: float
height: float
size: float
rotation: float
rotationX: float
rotationZ: float
hole: bool
taperTopWidth: float
taperTopDepth: float
taperBottomWidth: float
taperBottomDepth: float
kind: Literal['sketchSweep']
profile: SketchSweepProfileSphereShapeRequest
class SphereShapeRequest:
name: str
color: str
x: float
z: float
elevation: float
width: float
depth: float
height: float
size: float
rotation: float
rotationX: float
rotationZ: float
hole: bool
taperTopWidth: float
taperTopDepth: float
taperBottomWidth: float
taperBottomDepth: float
kind: Literal['sphere']
steps: intStepAssemblyNode(name: 'str', children: "List['StepAssemblyNode']" = ..., id: 'Optional[str]' = None) -> None
A named STEP product and its nested component occurrences.
StepComponent(id: 'str', occurrence_id: 'str', path: 'List[StepAssemblyNode]') -> None
STEP source occurrence identity and ancestry for an exploded solid.
THREAD_DESIGNATIONS
THREAD_DESIGNATIONS = ('M2', 'M2.5', 'M3', 'M4', 'M5', 'M6', 'M8', 'M10', 'M12', 'M16', 'M20', '#4-40', '#6-32', '#8-32', '#10-24', '1/4-20', '5/16-18', '3/8-16', '1/2-13')
TOKEN_ENV
TOKEN_ENV = 'SKETCHFORGE_API_TOKEN'
TextShapeRequest
class TextShapeRequest:
name: str
color: str
x: float
z: float
elevation: float
width: float
depth: float
height: float
size: float
rotation: float
rotationX: float
rotationZ: float
hole: bool
taperTopWidth: float
taperTopDepth: float
taperBottomWidth: float
taperBottomDepth: float
kind: Literal['text']
text: str
font: str
bevel: float
segments: intThickness(transport: 'Transport') -> 'None'
Samples opposing surfaces to estimate wall thickness.
ThreadShapeRequest
class ThreadShapeRequest:
name: str
color: str
x: float
z: float
elevation: float
width: float
depth: float
height: float
size: str
rotation: float
rotationX: float
rotationZ: float
hole: bool
taperTopWidth: float
taperTopDepth: float
taperBottomWidth: float
taperBottomDepth: float
kind: Literal['thread']
diameter: float
length: float
pitch: float
turns: float
clearance: float
core: bool
sides: int
quality: int
profile: Sequence[Sequence[float]]
outline: Sequence[Sequence[float]]
revolve: Mapping[str, Any]TorusShapeRequest
class TorusShapeRequest:
name: str
color: str
x: float
z: float
elevation: float
width: float
depth: float
height: float
size: float
rotation: float
rotationX: float
rotationZ: float
hole: bool
taperTopWidth: float
taperTopDepth: float
taperBottomWidth: float
taperBottomDepth: float
kind: Literal['torus']TreatmentResult(shape: 'ShapeSummary', triangles: 'int', revision: 'int') -> None
Treatments(transport: 'Transport') -> 'None'
TubeShapeRequest
class TubeShapeRequest:
name: str
color: str
x: float
z: float
elevation: float
width: float
depth: float
height: float
size: float
rotation: float
rotationX: float
rotationZ: float
hole: bool
taperTopWidth: float
taperTopDepth: float
taperBottomWidth: float
taperBottomDepth: float
kind: Literal['tube']
bevel: floatVector3(x: 'float', y: 'float', z: 'float') -> None
WallThicknessEstimate(minimum: 'Optional[float]', unit: "Literal['mm']", method: "Literal['sampled-opposing-surface-distance']", samples_per_face: 'int', faces_checked: 'int') -> None
Sampled opposing-surface distance, not a certified minimum thickness.
WedgeShapeRequest
class WedgeShapeRequest:
name: str
color: str
x: float
z: float
elevation: float
width: float
depth: float
height: float
size: float
rotation: float
rotationX: float
rotationZ: float
hole: bool
taperTopWidth: float
taperTopDepth: float
taperBottomWidth: float
taperBottomDepth: float
kind: Literal['wedge']angle_of(point: 'Point2', center: 'Optional[Point2]' = None) -> 'float'
The position's angle in degrees, the way ring measures one.
centered_offsets(count: 'int', spacing: 'float') -> 'List[float]'
chunk(items: 'Sequence[Any]', size: 'int') -> 'List[List[Any]]'
Splits into runs of at most size.
client_from_environment(environment: 'Optional[Mapping[str, str]]' = None, **overrides: 'Any') -> 'SketchForgeClient'
define_macro(name: 'str', run: 'Callable[[MacroContext], Any]', project: 'Union[str, Sequence[str]]' = 'fresh', description: 'str' = '', params: 'Optional[Mapping[str, MacroParameterValue]]' = None) -> 'Macro'
describe_macro_file(path: 'str') -> 'Dict[str, Any]'
Read a macro's literal metadata without importing or executing its code.
grid(columns: 'int', rows: 'int', spacing_x: 'float', spacing_z: 'float', center: 'Point2' = Point2(x=0.0, z=0.0)) -> 'List[Point2]'
A columns by rows grid, centred, with its own pitch in each direction.
layout
load_macro_file(path: 'str') -> 'Macro'
Imports a macro file by path, under its own module name.
mm(value: 'float', places: 'int' = 4) -> 'float'
Rounded, so a computed position reads as a number rather than a float.
resolve_macro_params(defaults: 'Mapping[str, MacroParameterValue]', overrides: 'Mapping[str, str]') -> 'Dict[str, MacroParameterValue]'
A macro's parameters, with overrides coerced to the type of each default.
resolve_macro_project(client: 'SketchForgeClient', macro: 'Macro', target_project_id: 'Optional[str]' = None, now: 'Optional[_datetime.datetime]' = None) -> 'ResolvedProject'
The project a macro runs in, per its declared mode.
ring(count: 'int', radius: 'float', center: 'Point2' = Point2(x=0.0, z=0.0), start_angle: 'float' = 0.0) -> 'List[Point2]'
count positions evenly spaced on a circle of radius.
row(count: 'int', spacing: 'float', center: 'Point2' = Point2(x=0.0, z=0.0)) -> 'List[Point2]'
count positions spacing apart, centred on center.
run_macro(client: 'SketchForgeClient', macro: 'Macro', params: 'Optional[Mapping[str, str]]' = None, target_project_id: 'Optional[str]' = None, log: 'Optional[Callable[[str], None]]' = None, now: 'Optional[_datetime.datetime]' = None) -> 'MacroRunReport'
Runs a macro and reports what it did to the project, as the CLI prints it.
run_stamp(now: 'Optional[_datetime.datetime]' = None) -> 'str'
A stamp that sorts chronologically and survives a project name: 20260102-114530.
target_project_from_environment(environment: 'Optional[Mapping[str, str]]' = None) -> 'Optional[str]'
The project an operator named for a target macro, if any.
Documentation version: 1.30.0 · Repository revision: 1cb9fee8dff4d394684c229dd67a21da539d167f · View source