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
Import Statement
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.5.tar.gz
(4.8 kB
view details)
Built Distribution
File details
Details for the file weeby.py-0.0.5.tar.gz
.
File metadata
- Download URL: weeby.py-0.0.5.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 | 12e3b1690168f18cc453dee1ba6fbf73e9ffe3825e554f10ff9375872331a4f3 |
|
MD5 | 6e35763b40ee70d81473a2bb06e92963 |
|
BLAKE2b-256 | 4e5a4f5914eeab303330491464ec1fd06b53bb5085a6c8242b86c68bc0f2708a |
File details
Details for the file weeby.py-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: weeby.py-0.0.5-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 | db9d355bb2a18f95b811e32510dcb611b5d8cc816f56575f7f73bc98568fca1a |
|
MD5 | e8cd7d624bb0c7dadf7407621b6d82a5 |
|
BLAKE2b-256 | cd188d941fb1cd9f48bdf4165c55108465bb40f7c732b0397a7b390a6f9b4261 |