Skip to main content

Get random anime gifs by category.

Project description

animegifs.py

<a href="https://pypi.org/project/animegifs/">

<img src="https://img.shields.io/pypi/dm/animegifs?logo=PyPI&style=for-the-badge" alt="PyPi Downloads"/></a>

<a href="https://discord.gg/TKZJ4GJj2z">

<img src="https://img.shields.io/discord/856005478789677096?logo=Discord&style=for-the-badge" alt="Discord Server"/></a>

<a href="https://pypi.org/project/animegifs/">

<img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/MarcoSa-2000/animegifs?style=for-the-badge"></a>

<img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/animegifs?logo=Python&logoColor=%23FFFF00&style=for-the-badge">

<img alt="GitHub watchers" src="https://img.shields.io/github/watchers/MarcoSa-2000/animegifs?style=social">

<a href="https://pepy.tech/projects/animegifs"><img src="https://static.pepy.tech/badge/animegifs" alt="PyPI Downloads"></a>

API wrapper for animegifs. Get random anime gifs by category. Use Python (intended (for now) for Discord).

WIP - updated in time to time.

Version below v1.0 will not have the gifs library updated anymore and the gifs may return 404 as they were hosted on Discord.

For troubleshoots, known errors and categories list, check below.

pip install animegifs

HOW TO USE

#v1.2.0>

from animegifs import animegifs



gifs = animegifs.Animegifs()



gif = gifs.get_gif(category) #gifs.get_gif('hug') and return the url of the gif.

mal = gifs.get_mal(gif) #get url of the gif's anime myanimelist page.

title = gifs.get_animetitle(gif) #get the title of the gif's anime.

malid = gifs.get_malId(gif) #get the ID of the gif's anime myanimelist page.

categories = gifs.get_categories() #get a list of available ctegories.
#v0.6>

from animegifs import animegifs



gifs = animegifs.Animegifs()



user_input = input() #let user send any input and search if that input matches a category.

#if user_input == "nom":  #nom as category doesn't exist, but is similar to bite (as example)

#   user_input = "bite"

try:

    gif = gifs.get_gif(user_input) #return the url of the gif if the category exists.

except animegifs.errors.CategoryError:

    print("not a valid gif category.")

Category list:

A

  • Attack

B

  • Bite, Bloodsuck, Blush, Bonk, Brofist

C

  • Cry, Cuddle

D

  • Dance, Disgust

E

  • Exploding

F

  • Facedesk, Facepalm, Flick, Flirt, French_kiss

H

  • Handhold, Happy, Harass, Highfive, Hug

I

  • Icecream, Insult

K

  • Kill, Kiss

L

  • Lick, Love

M

  • Marry

N

  • Nod, Nosebleed, Note, Nuzzle

P

  • Pat, Peck, Poke, Popcorn, Pout, Punch, Punish

R

  • Run

S

  • Sad, Scared, Scold, Shoot, Shrug, Sip, Slap, Smack, Smirk, Sorry, Spank, Stare

T

  • Tease, Threat, Tickle, Tired

W

  • Wave

Y

  • Yawn

Special Category List

  • Random, Steal-magic

Live API

You can test out the API (and lib functionality) on my bot's website here: https://enkidu-app.github.io/animegifs

Submit a GIF

If you also want to contribute to the gifs collection, you can submit a gif at: https://forms.gle/wxWmRuy5VCdDCZWp8

Troubleshooting and other

If you encounter an error, please raise an issue on the issue page: https://github.com/MarcoSa-2000/animegifs/issues.

Alternatively, you can join my Discord server (https://discord.com/invite/TKZJ4GJj2z) to request new categories, functions, provide feedback, or report any errors.

I do also have a multi-function Discord bot. Feel free to check out the web dashboard here: https://enkidu-app.github.io.

Copyright

This repository doesn't include any copyrighted material.

If you happen to come across any copyrighted content within this repository (but hosted elsewhere) that you own or represent, email me at grest0grest@gmail.com.

Please provide specific details about the copyrighted material and where it can be found.

Once I confirm your claim, I'll take immediate action to remove the identified material.

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

animegifs-1.2.2.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

animegifs-1.2.2-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file animegifs-1.2.2.tar.gz.

File metadata

  • Download URL: animegifs-1.2.2.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for animegifs-1.2.2.tar.gz
Algorithm Hash digest
SHA256 8c3919ac7dc31bc3676780ba6fc76d659bade54a44fecc1c054de3b6707faa16
MD5 e3be7199694eaf89c96e6b0a1e9265ad
BLAKE2b-256 38e5ec6836f6e75c09a8da6188d62f0629cabb3478c2543be0a2306d7f70d084

See more details on using hashes here.

File details

Details for the file animegifs-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: animegifs-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for animegifs-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a264d0daef1844c9d6d6affed1629b04e229c3832c27d7ab4cc5e0f1a0631a05
MD5 9c43b619cf606836c96466f2e4da704d
BLAKE2b-256 f57f5c10ca4b9614e355ea54a327bca3f28a40d5941d24c7a5b48ce19fe40b28

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page