Skip to main content

Pull, edit, and push Google Forms using local files

Project description

ExtraForm

Pull, edit, and push Google Forms using local files.

ExtraForm transforms Google Forms into a file-based representation optimized for LLM agents. It follows the same pull/diff/push workflow as ExtraSheet.

Installation

pip install extraform

Or with uvx:

uvx extraform pull <form_url>

Quick Start

# 1. Login (one-time)
extraform login

# 2. Pull a form
extraform pull https://docs.google.com/forms/d/1FAIpQLSd.../edit

# 3. Edit form.json in your editor or with an AI agent

# 4. Preview changes
extraform diff 1FAIpQLSd...

# 5. Apply changes
extraform push 1FAIpQLSd...

Commands

pull

Download a Google Form to a local folder:

extraform pull <form_url_or_id> [output_dir]

Options:

  • --responses - Include form responses (read-only)
  • --max-responses N - Maximum responses to fetch (default: 100)
  • --no-raw - Don't save raw API responses

diff

Preview changes without applying them:

extraform diff <folder>

Outputs the batchUpdate JSON to stdout.

push

Apply changes to the Google Form:

extraform push <folder>

On-Disk Format

After pulling a form, you'll have:

<form_id>/
  form.json                 # Form structure - edit this!
  responses.tsv             # Read-only snapshot of responses
  .raw/
    form.json               # Raw API response
    responses.json          # Raw responses (if fetched)
  .pristine/
    form.zip                # Original state for diff

form.json

The form structure mirrors the Google Forms API but is cleaned up for readability:

{
  "formId": "1FAIpQLSd...",
  "info": {
    "title": "My Survey",
    "description": "Please fill out this survey"
  },
  "items": [
    {
      "itemId": "abc123",
      "title": "What is your name?",
      "questionItem": {
        "question": {
          "required": true,
          "textQuestion": {
            "paragraph": false
          }
        }
      }
    }
  ]
}

Question Types

Type JSON Key Example
Short answer textQuestion {"paragraph": false}
Long answer textQuestion {"paragraph": true}
Multiple choice choiceQuestion {"type": "RADIO", "options": [...]}
Checkboxes choiceQuestion {"type": "CHECKBOX", "options": [...]}
Dropdown choiceQuestion {"type": "DROP_DOWN", "options": [...]}
Linear scale scaleQuestion {"low": 1, "high": 5}
Date dateQuestion {"includeYear": true}
Time timeQuestion {"duration": false}
Rating ratingQuestion {"iconType": "STAR", "ratingScaleLevel": 5}

Non-Question Items

Type Purpose
pageBreakItem Section divider
textItem Static text/instructions
imageItem Embedded image
videoItem Embedded YouTube video

Limitations

  • File upload questions: Cannot be created via API (read-only)
  • Responses: Read-only, cannot modify submitted responses
  • documentTitle: Read-only, update via Google Drive

Development

cd extraform
uv sync
uv run pytest tests/ -v
uv run ruff check . && uv run ruff format .
uv run mypy src/extraform

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

extraform-0.1.0.tar.gz (65.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

extraform-0.1.0-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file extraform-0.1.0.tar.gz.

File metadata

  • Download URL: extraform-0.1.0.tar.gz
  • Upload date:
  • Size: 65.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for extraform-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b12562e568627fdfa69f59c18f4329f3ee2f03aa08fc7c47e2a0d12f905c1ca5
MD5 ba5f5fa85a26f4a305b034448b0afb5f
BLAKE2b-256 c4a43af4cb523813fade33e1fd2c1a31c68551bd583aee380c45031c4852bab7

See more details on using hashes here.

Provenance

The following attestation bundles were made for extraform-0.1.0.tar.gz:

Publisher: publish-extraform.yml on think41/extrasuite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file extraform-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: extraform-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for extraform-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00ee9a2d06bc43db699010bc40e93eb92bc5e048d63d659c02da503dca36aadc
MD5 2007f3178e8ab6f9e39699a68da30fe8
BLAKE2b-256 849a3fab5b3c92a30baad49908294b14013ba5e193023f1e5b364302e12cd0eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for extraform-0.1.0-py3-none-any.whl:

Publisher: publish-extraform.yml on think41/extrasuite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page