Metadata-Version: 2.4
Name: google-form-poster
Version: 0.1.1
Summary: Submit data rows to Google Forms via POST requests
Project-URL: Homepage, https://github.com/obabawale/google-form-poster.git
Project-URL: Source, https://github.com/obabawale/google-form-poster.git
Author-email: Olami <olami@example.com>
License: MIT
License-File: LICENSE
Keywords: automation,form-submission,google-forms
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Requires-Dist: pandas>=2.0
Requires-Dist: python-dotenv>=1.0
Requires-Dist: requests>=2.31
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# Google Form Poster

Submit data rows to a Google Form via POST requests.

## Installation

```bash
pip install google-form-poster
```

## Usage — as a library

```python
from post_to_google_form import post_data

url = "https://docs.google.com/forms/d/e/.../viewform"

# Data keys match entry IDs directly
data = [{"entry.12345": "Alice", "entry.67890": "alice@example.com"}]
results = post_data(url, data)

# Or use key_mappings to translate your keys
key_mappings = {"name": "entry.12345", "email": "entry.67890"}
data = [{"name": "Alice", "email": "alice@example.com"}]
results = post_data(url, data, key_mappings)

# results = [
#   {"index": 0, "status_code": 200, "payload": {"entry.12345": "Alice", ...}},
# ]
```

`forms.gle` short links are automatically resolved:

```python
post_data("https://forms.gle/abc123", data)
```

## Usage — CLI

```bash
post-to-google-form --file data.json --url https://forms.gle/abc123

# With key mappings:
post-to-google-form --file data.json --url https://forms.gle/abc123 \
    --key-mappings mappings.json
```

All flags fall back to environment variables (`FILE_PATH`, `GOOGLE_FORM_URL`, `KEY_MAPPINGS`), loaded from `.env` if present.
