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. Pull a form
extraform pull https://docs.google.com/forms/d/1FAIpQLSd.../edit

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

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

# 4. 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.3.1.tar.gz (67.9 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.3.1-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for extraform-0.3.1.tar.gz
Algorithm Hash digest
SHA256 5f7d99a0e24a26b9b8dc3850a944a24fc7b97ba4af701aaf8e88ae68d2d13fa9
MD5 0975fe1e5e6c8986e817c98c62d6c363
BLAKE2b-256 b5f6c4d4f641e742b6cce93378acd71e515fe735a442464c9d6b00e2781f1066

See more details on using hashes here.

Provenance

The following attestation bundles were made for extraform-0.3.1.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.3.1-py3-none-any.whl.

File metadata

  • Download URL: extraform-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 24.3 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.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cb1f4a91580d50f82544ab001dde1ac545259d4b2819e4aa2e041c50355cf547
MD5 712c3bcf6e5d857291926bc689b768f1
BLAKE2b-256 7be5c37430f2242e2c7e416b9d6cced5c3c44a43e16ea61f4efc9e6c9cb87d88

See more details on using hashes here.

Provenance

The following attestation bundles were made for extraform-0.3.1-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