Skip to content

PapyrusThePlant/strawpoll.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

strawpoll.py

https://img.shields.io/pypi/pyversions/strawpoll.py.png https://img.shields.io/pypi/v/strawpoll.py.png https://img.shields.io/badge/license-MIT-blue.png https://readthedocs.org/projects/strawpollpy/badge/

strawpoll.py is an async wrapper for strawpoll's API written in Python.

For more info, take a look at the documentation.

Is this project dead?

No, it is not dead, I am still around, there just isn't much to do until either Strawpoll update their api or someone stumbles upon this package and finds an issue with it.

Installation

$ pip install strawpoll.py

Usage

import asyncio
import strawpoll

async def main():
    api = strawpoll.API()

    p1 = await api.get_poll(10915632)
    print(p1.results())

    p2 = strawpoll.Poll('lol?', ['ha', 'haha', 'hahaha', 'hahahaha', 'hahahahaha'])
    p2 = await api.submit_poll(p2)
    print(p2.url)

asyncio.get_event_loop().run_until_complete(main())