Skip to content

Add canonical examples for the marketing SDK pages - #91

Draft
Jonesy464 wants to merge 1 commit into
masterfrom
rj/3646-canonical-examples
Draft

Add canonical examples for the marketing SDK pages#91
Jonesy464 wants to merge 1 commit into
masterfrom
rj/3646-canonical-examples

Conversation

@Jonesy464

Copy link
Copy Markdown
Contributor

Part of anvilco/marketing-site#3646 (SDK repos own their code examples; the central anvil-api-usage-examples repo is being sunset).

Renames the overlapping examples to the canonical names the marketing SDK pages source at build (the sourcing shipped with anvilco/marketing-site#3617 scans examples/ and kebab-cases each basename into a concept, so generate_markdown.py serves the generate-markdown page):

  • fill_pdf.py -> fill.py
  • generate_pdf.py -> generate_markdown.py (markdown-only; the HTML variant gets its own file)
  • new generate_html.py
  • create_etch_existing_cast.py -> create_etch_packet.py

The other examples (workflow, GraphQL, uploads, forge) are untouched. Content refresh along the way:

  • The etch signer's field_id was the placeholder def456, which doesn't exist on the sample template; now signature (verified live).
  • The etch packet now fills the template via add_file_payloads before sending, matching the JS/TS examples, and takes the signer email from SIGNER_EMAIL.
  • Stale fill data cleaned up; long commented-out option blocks trimmed so the files read well on the marketing pages, which render the file contents directly.

Verification:

  • isort, black, pylint, and pydocstyle all pass at the poetry.lock-pinned versions. mypy reports only the pre-existing EtchSigner false positive that also fires on untouched examples under a newer pydantic; CI's pinned env is unaffected.
  • All four executed live against the API with a dev key: fill and both generates returned 200 with valid PDFs (confirming the sample template and its field IDs), and the e-sign mutation created a packet (run as a draft so no email was sent; the committed file keeps the client's defaults: is_test=True, is_draft=False).
  • The marketing site's deriveLanguageExamples resolves the four canonical concepts from this directory.

@Jonesy464 Jonesy464 self-assigned this Aug 20, 2026
@Jonesy464
Jonesy464 force-pushed the rj/3646-canonical-examples branch from 3dc5aed to 7728e01 Compare August 20, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant