Skip to content
Archee.Docs

Python SDK

Copy

The archee modules available inside execute, with their main functions.

Inside execute, import archee gives the modules below. This page lists the main functions. search returns the full signature, units and docstring of each one and is always current.

Cited engineering calculations. Each result carries its values, checks and the textbook sources behind them.

  • calc.list() returns every calculation available.
  • calc.describe(name) returns the inputs, units and outputs of one calculation.
  • calc.run(name, **inputs) runs a calculation by name, for example "vbelt".
  • calc.run_bearing_rolling(...), calc.run_belt_life(...) and others are typed shortcuts for individual calculations.

Catalogue lookups.

  • standards.lookup(kind, **params) returns rows of one standard-part kind, for example lookup("bearing", d=40), lookup("key", d=42) or lookup("fastener", size="M12").
  • standards.kinds() lists every kind lookup reads, with its parameters.
  • standards.housing_proportions(a_w) returns gearbox housing proportions from the centre distance.

DXF and DWG drawings.

  • draft.inspect(drawing, …) lists entities, layers and blocks, paged. member_offset pages the entities of one id.
  • draft.render(drawing, output, …) writes a PNG of the drawing or a region of it.
  • draft.check(drawing, design, kind) returns drawing findings. Without a design only the sheet rules run and the rest report NOT RUN.
  • draft.patch(drawing, id, output, edits) moves, adds (line, circle, arc, polyline, text) and deletes the entities of one id in a DXF.
  • draft.convert(to, input, output) converts DXF ↔ DWG.
  • draft.detail(design, out_dir, part_type) makes a shaft or gear detail drawing from the design.
  • draft.build(...) and draft.edit(...) build or change drawings with a builder script.

The Knowledge Base of engineering textbooks and standards.

  • kb.search(query, limit) returns passages with their source, printed page and score.
  • kb.page(source, page) returns one page of a source.
  • verify.check(path, standard="TCVN") returns TCVN findings for a drawing.
  • deliver.package(kind) returns a submit-ready a0_assembly, a3_detail or report package.
  • files.upload(name, data) stores bytes or text in the project.
  • files.list(prefix) lists files with size and SHA-256.
  • files.link(path) returns a signed download link that expires.
  • project.info() returns the current project.
  • project.design(path) returns the design record, or one value in it.
  • project.design_set(path, value, expected_revision) changes one design value safely.
  • agent.run(prompt) hands long work to Archee’s agent and returns a run id.
  • runs.get(run_id) returns the state and output of a run.

Every SDK error derives from archee.errors.ArcheeError.

  • BudgetExceeded: the program spent its credit allowance.
  • ScopeDenied: the connection lacks a scope the call needs.
  • PlanDenied: your plan does not include the feature.
  • NotFound and Invalid: a missing file or a bad argument.
  • Unavailable and BridgeTimeout: a service was busy or slow. Retry.
  • Internal: something failed on Archee’s side. Quote the call_id.