Skip to main content

Python wrapper for the CGHMC API (Frinkiac, Morbotron, Master Of All Science and more!)

Project description

Internet King Popup Banner by BLUEamnesiac

CompuGlobal

https://img.shields.io/pypi/v/compuglobal.svg https://img.shields.io/pypi/pyversions/compuglobal.svg https://img.shields.io/badge/PRs-welcome-brightgreen.svg

Python wrapper for all endpoints of the following undocumented APIs:

Frinkiac, Morbotron, Master Of All Science, Capital Beat Us and Good God Lemon

Note: I’ll be keeping the wrapper up to date as more APIs are released.

CompuGlobal allows for both random and searchable screencaps, images and gifs embedded with default or custom captions for the following shows:

The Simpsons, Futurama, Rick and Morty, West Wing and 30 Rock.

Make sure to acquaint yourself with the API using the documentation.

Installation

To install the library, you can just run the following command:

python3 -m pip install -U compuglobal

Basic Usage

import compuglobal

simpsons = compuglobal.Frinkiac()

# Random
screencap = simpsons.get_random_screencap()

# Search
screencap = simpsons.search_for_screencap('nothing at all')

# Images/Gifs
image = screencap.get_meme_url()
gif = screencap.get_gif_url()

For documented examples, check here.

Async Usage

import asyncio

import compuglobal


async def main():
    simpsons = compuglobal.aio.Frinkiac()

    # Random
    screencap = await simpsons.get_random_screencap()

    # Search
    screencap = await simpsons.search_for_screencap('nothing at all')

    # Images/Gifs
    image = screencap.get_meme_url()
    gif = await screencap.get_gif_url()

if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())

For documented examples, check here.

What’s New

0.2.1 - Breaking Changes

  • Added Frame object: search(), get_frames() and get_nearby_frames() now all return a list of Frame objects instead of the json response.

Preview

https://frinkiac.com/gif/S11E10/315560/322560.gif?b64lines=IFdFTEwsIElUIEFMTE9XUyBGT1IKIE1BWElNVU0gTU9CSUxJVFkuCiBGRUVMUyBMSUtFIEknTSBXRUFSSU5HCiBOT1RISU5HIEFUIEFMTC4=

Credits

Creators and contributors of Frinkiac, Morbotron, Master of All Science, Good God Lemon and Capital Beat Us:

BLUEamnesiac for the Internet King Popup Banner

Named CompuGlobal as shorthand for CompuGlobalHyperMegaCap, as the family of websites are named.

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

compuglobal-0.2.3.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

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

compuglobal-0.2.3-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file compuglobal-0.2.3.tar.gz.

File metadata

  • Download URL: compuglobal-0.2.3.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.6.0

File hashes

Hashes for compuglobal-0.2.3.tar.gz
Algorithm Hash digest
SHA256 77d1d2a9950adcac9109d1afafbab0966f3fea2f8ea3f60c3ea2c9c0aa5cf976
MD5 8949f82b4352f3d8791020558bc086dc
BLAKE2b-256 5ba7f4f73f679f4545ac6e145f35183441af375fce435e6d85f9009a59feef78

See more details on using hashes here.

File details

Details for the file compuglobal-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: compuglobal-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.6.0

File hashes

Hashes for compuglobal-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 83abb1ed0eb955c978cdd52a8b0e01a79c6143364a690b349f38998b9dbe0094
MD5 6472642835320f301d6464c770c6f23e
BLAKE2b-256 74c584af982aa0b566f6b506312d172725c3b45539e05025be6ac3c5afcc76b0

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