Google Forms wrapper for Python
Project description
GForms
A python wrapper for public Google Forms.
This package does not implement form editing / sharing / other actions with user-owned forms
Forms with required sign-in are not supported
Installation
python3 -m pip install gforms
Features
- Parse a form
- Fill a form
- Submit a form
Example
import requests
from gforms import Form
from gforms.elements import Short
def callback(element, page_index, element_index):
if page_index == 0 and element_index == 1: # fill an element based on its position
return 'Yes'
if isinstance(element, Short) and element,name == 'Your opinion:':
return input(element.name)
url = 'https://docs.google.com/forms/d/e/.../viewform'
form = Form(url)
form.load(requests)
print(form.to_str(indent=2)) # a text representation, may be useful for CLI applications
form.fill(callback)
form.submit(requests)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gforms-0.5.2.tar.gz
(28.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
gforms-0.5.2-py3-none-any.whl
(32.5 kB
view details)
File details
Details for the file gforms-0.5.2.tar.gz.
File metadata
- Download URL: gforms-0.5.2.tar.gz
- Upload date:
- Size: 28.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ac9616f17dca6a943f0d002290b8c323bf9c41ecb43e51e1c880c3a8af03ec0
|
|
| MD5 |
cb346b9b506181ebbe5d77079e01b783
|
|
| BLAKE2b-256 |
4f2817945c72a840e5584312d14eddb3626a6515dcf400caa1f59ef38a1f7380
|
File details
Details for the file gforms-0.5.2-py3-none-any.whl.
File metadata
- Download URL: gforms-0.5.2-py3-none-any.whl
- Upload date:
- Size: 32.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
567cc1c6e425106c17db5d5c2c2d1a9933e9c2bbe4a39c73c707410c8b53a6d4
|
|
| MD5 |
7f96f9ed8ddc33963dbffcaa3880ea90
|
|
| BLAKE2b-256 |
8979e24c50bb952c0ffedff44fb9e104778602363322be7d1655706179b820c8
|