Giter Site home page Giter Site logo

pygoogleform's Introduction

PyGoogleForm

A simple Python library to submit Google Forms in Python.

The goal is to be able to submit Google Forms from anything else than a web page (a Desktop app, or any device that doesn't use a browser).

Installation

pip install PyGoogleForm

How to use

First, create your form in Google Form, and then click "view live form". Then in your code:

import PyGoogleForm
# Use the url of the page to initialize the GFParser
url = "https://docs.google.com/forms/d/1jzDkEha066GwSCcSrCg1yaJJLpJAk0_aIFwf6GQgmmU/viewform"
gForm = PyGoogleForm.GFParser(url)

# Get the questions by IDs
questionIDs = gForm.getQuestionIDs()
question1 = gForm.getQuestionInfo(questionIDs[0])
# question1 == [ID, type, question text, [possible choices]]

# Answering a question
gForm.answerQuestion(question[0], "ok")

# Finally, submit the form
gForm.submit()

Limitations

  • can handle only basic types: radio, select, checkbox, text, paragraph text
  • doesn't support "required" answers. The form is submitted and the answer recorded in the answer sheet

Licence

The project uses a permissive MIT Licence. Do whatever you want with it.

Resource

Special thanks to Kristler on Reddit for the inspiration.

pygoogleform's People

Contributors

sebcagnon avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.