Welcome to Gifpy’s documentation!

class Giphy(token)

Represents the Giphy API with the provided token

_token

The provided token. It is internaly used by the methods below

_api

The url of the Giphy API. It is internaly used by the methods below

Returns a list of Gifs.

random()

Returns a random Gif.

upload(file)

Upload the provided file to Giphy. Must be .gif. Returns the uploaded gif ID.

class Gif(data)

Represents the Gif object.

id

The id of the Gif.

title

The title of the Gif.

url

Link to the Gif.

short_url

Shorten version of the url.

embed_url

URL for embeding.

images

Image variants of the GIF.

class Images(data)

Represents the Images object.

original

The original image.

fixed_width

The 200px width version of the image. Useful for mobile.

fixed:height

The 200px height version of the image. Useful for mobile.

small_fixed_width

The 100px width version of the image. Useful for mobile

small_fixed_height

The 100px height version of the image. Useful for mobile.

class Image(data)

Represents the Image object

url

URL of the image. The difference between this and Gif.url is that this one leads to the “pure image”, while Gif.url redirects to the normal page.

width

Width of the image.

height

Height of the image.

size

Size of the image, in bytes

webp

URL to the webp variant of the image.

webp_size

Size of the webp variant, in bytes.

mp4

URL to the mp4 variant of the image.

mp4_size

Size of the mp4 variant, in bytes

save(file)

Save the image to file. Must be .gif

Indices and tables