API wrapper library for WeebyAPI
Project description
weeby.py
API Wrapper in Python for WeebyAPI
Checkout WeebyAPI : https://weebyapi.xyz
Get your API token here : https://weebyapi.xyz/discord
Discord Bot using WeebyAPI : https://github.com/asheeeshh/Kanna-Chan
Installation
pip install weeby.py
Using JSON Response method
import weeby
my_weeby = weeby.Weeby('your_weebyAPI_token_goes_here')
# Random Message
# types available -> 8ball, belikebill, dadjoke, geography, joke, roast
my_weeby.get_json_response().random(type="roast") # Returns String
# Random Animal Image
# types available -> bird, bunny, cat, dog, fox, goose, kangaroo, koala, lizard, panda
my_weeby.get_json_response().animal_image(type="cat") # Returns Image URL
# Random Meme from SubReddit
# types available -> meme, memes, wholesome, dank
my_weeby.get_json_response().meme(type="meme") # Returns List with Image URL and PermaLink
# Random Word
# types available -> random, halloween, christmas, list
my_weeby.get_json_response().word(type="random") # Returns random word or list of words
# Lyrics
my_weeby.get_json_response().lyrics(track="6 months by john k")
# Returns Lyrics of the song (JSON Response)
# WeebyAPI Stats
my_weeby.get_json_response().stats() # Return JSON with stats of WeebyAPI
Using Image Effect Method
import weeby
from PIL import Image
from io import BytesIO
my_weeby = weeby.Weeby('your_weebyAPI_token_goes_here')
# General Effects
'''
Types available -> blur, contrast, edge, greyscale, invert, pixelize, sepia, sharpen,
silhouette, threshold, blurple, invertedthreshold, invertedgreyscale
Returns Image Buffer
Image type -> .png/.jpg/.gif
'''
image = my_weeby.apply_effect().general(image_url="your_image_url", type="greyscale")
im = Image.open(BytesIO(image))
im.save("generated.png")
# Intensity Effects
'''
Types avaialable -> brightness, darkness, distort
Returns Image Buffer
Image type -> .png/.jpg/.gif
'''
image = my_weeby.apply_effect().intensity(image_url="your_image_url", type="darkness",
intensity=50)
im = Image.open(BytesIO(image))
im.save("generated.png")
# Level Effects
'''
Types avaialable -> fisheye, desaturate
Returns Image Buffer
Image type -> .png/.jpg/.gif
'''
image = my_weeby.apply_effect().intensity(image_url="your_image_url", type="desaturate",
level=10)
im = Image.open(BytesIO(image))
im.save("generated.png")
# Resize Image (Limit: 1-2000 for both width and height)
'''
Returns Image Buffer
Image type -> .png/.jpg/.gif
'''
image = my_weeby.apply_effect().intensity(image_url="your_image__url", width=200, height=200)
im = Image.open(BytesIO(image))
im.save("generated.png")
Using Overlays Method
import weeby
from PIL import Image
from io import BytesIO
my_weeby = weeby.Weeby('your_weebyAPI_token_goes_here')
'''
Types of Overlays available :approved, bazinga, caution, christmas, easter, fire, glass,
halloween, hearts, jail, rainbow, rejected, simp, snow, thuglife, balance, brilliance, bravery
Image Type: .jpg/.png/.gif
Returns: Image Buffer (Asset)
'''
image = my_weeby.set_overlay().overlay(image_url="your_image_url" type="jail")
im = Image.open(BytesIO(image))
im.save("generated.png)
GIF Method
import weeby
'''
Types of GIF available: akko, angry, baka, bath, boom, boop, beer, bite, blush, bonk, bored,
cheer, chase, clap, confused, cookie, cringe, cry, cuddle, dab, dance, facepalm, feed, flower,
fly, gabriel, glomp, grin, happy, hate, handhold, highfive, hug, icecream, kick, kiss, laugh, lick,
love, lurk, miyano, nervous, no, nom, nuzzle, panic, pat, pikachu, poke, pout, punch, rawr,
run, sagiri, shrug, sip, slap, sleepy, smug, stare, sword, tease, teleport, think, throw,
thumbs, tickle, triggered, wag, wave, wedding, wink, yes, zerotwo
Returns : GIF URL
'''
my_weeby.get_gif().gif(type="baka")
Generator Method Coming Soon ♥
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
weeby.py-0.0.6.tar.gz
(4.8 kB
view details)
Built Distribution
File details
Details for the file weeby.py-0.0.6.tar.gz
.
File metadata
- Download URL: weeby.py-0.0.6.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cce3f84341735def7016cd1a7d9fd33d8d46f9dff3cf5294d635e47b26c30164 |
|
MD5 | 740f238b418c787098ba15a346aa01c2 |
|
BLAKE2b-256 | 8286e68432648450d90d3ee006a88dadd792836ac982932e19cc22b8ba52be4a |
File details
Details for the file weeby.py-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: weeby.py-0.0.6-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b196a8f233d2c8e838e7f3d0c75f07fd8d03d23612c1ff802e51b3acffa1ddf |
|
MD5 | 38abc6b1bca27edf675c0ea1648d2ece |
|
BLAKE2b-256 | 8a36796aee81cab4aa19969384d069845bdc840091b3bcb4ad5ab9f8c9a46f9f |