Skip to main content

A simple idiot's guide api wrapper in python

Project description

# Idiotic-Wrapper (Python edition)
This is an API wrapper for the [idiot's guide api](
The wrapper is asynchronous and is hightly compatible with []( Being built with aiohttp that comes with you don't have to add extra dependencies!

## Example
Retrieving image in a regular code
import idioticapi
import asyncio

client = idioticapi.Client("Your api key", dev=True)

async def main():
img = open("test.png", "wb")
img.write(await client.blame("This person"))
# untested though that's just what i think how it works shrug, its recommended to use it as a cog

``` example
import idioticapi
# you want easy access to it so maybe attach it to your bot # object, this allowes access to cogs as well and you don't have to remake the class everywhere.
bot.api = idioticapi.Client("Your api key", dev=True)

async def blame(ctx, *, text):
await ctx.send(file=discord.File(await bot.api.blame(text), "blame.png"))
# a simple example, change it to whatever you like to fit in a cog etc, also works with old 0.16.x just change the way i sent things, i didn't test though but SHOULD work
More info
Client takes a session as third argument, which you can reuse another session if you have one or leave it to create a new aiohttp.ClientSession()

## Requirements.
Python Minimum version: 3.5
- aiohttp

## Contributing
Contributing is allowed anytime just open a Pull Request with your changes, pretty straight forward right?

## License
Released under MIT License.

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 idioticapi, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size idioticapi-1.0.1.tar.gz (4.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 DigiCert DigiCert EV certificate StatusPage StatusPage Status page