Skip to main content

An async python wrapper for the Strawpoll API.

Project description

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.

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'])
    await api.submit_poll(p2)
    print(p2.url)

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for strawpoll.py, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size strawpoll.py-0.1.0-py3-none-any.whl (8.9 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size strawpoll.py-0.1.0.zip (11.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page