8000 GitHub - mbokulic/typeform: A Python wrapper for the Typeform data API (https://www.typeform.com/help/data-api/)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

mbokulic/typeform

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

typeform

A python wrapper for the typeform API

#Installation Clone the repo

git clone https://github.com/WarmongeR1/typeformPython.git

# In the base directory run:
python setup.py install

#Usage

Instantiating a form object

from typeform import TypeFormAPI
api = TypeFormAPI(API_KEY)
exampleForm = api.get_form(formKey)

Retrieving questions from a form object

# Returns a dictionary of the form {questionToken: Question Text}
questionDict = exampleFrom.get_questions()

# returns a transformation questions list
# that has numbered IDs of the type "q01"
# and more sensible type names
questionList = exampleFrom.get_transformed_questions()

# returns a markdown string with question IDs as headers and question text as the text
questionList = exampleFrom.questions_to_markdown()

Retrieving responses from a form object

# Returns all responses in form: {responseToken: {questionToken: answerString....}}
responseDict = exampleForm.get_all_completed_responses()

Get average rating of a rating or opinion question

rating = exampleForm.get_average_rating(questionToken)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

A Python wrapper for the Typeform data API (https://www.typeform.com/help/data-api/)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%
0