Skip to main content

Upload files

from almanac import AlmanacClient

wiki = AlmanacClient().wiki("acme/company-handbook")
upload = wiki.sources.upload(
    ["docs/onboarding.md", "docs/escalations.pdf"],
    guidance="prioritize onboarding and escalation paths",
)
SDK uploads accept individual file paths. They do not recursively expand folders or preserve a directory root. Use the CLI for folder discovery.

Wait only when a job exists

if upload.job:
    job = wiki.jobs.wait(upload.job.job_id)
    events = wiki.jobs.events(job.job_id)
    outcome = wiki.jobs.outcome(job.job_id)
A duplicate-only upload can return no job.

Garden the wiki

job = wiki.garden(guidance="tighten stale onboarding pages")
job = wiki.jobs.wait(job.job_id)
The SDK gardens the whole wiki. Use the CLI or REST API for page-scoped Garden. See Uploads and jobs for lifecycle semantics and API keys for write permissions.