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/github/actions/workflow/status/MitchellAW/CompuGlobal/test.yml?label=tests https://img.shields.io/github/license/mitchellaw/compuglobal

Python wrapper for all endpoints of the following undocumented APIs:

Frinkiac, Morbotron, Master Of All Science, and Capital Beat Us.

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, and West Wing.

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 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 = await simpsons.get_comic_panel_url(screencap)
    gif = await simpsons.get_gif_url(screencap)

if __name__ == '__main__':
    asyncio.run(main())

For documented examples, check here.

What’s New

0.3.0 - Breaking changes

These changes are to accommodate the extensive update to the APIs with new features:

  • All synchronous implementations of the package have been removed

  • The async endpoints persist and are now accessible via compuglobal or compuglobal.aio as done previously

  • The Master Of All Science API appears to be unavailable at this point in time and redirects to Frinkiac, I have added a deprecation warning to this API and it will remain unless the API returns

  • The package now requires Python 3.13+

  • Image, comic, and gif generation are all now performed using the API rather than from a Screencap

# This is now async
simpsons = compuglobal.Frinkiac()

# Previous usage
await screencap.get_gif_url()

# New usage
await simpsons.get_gif_url(screencap)

Preview

https://raw.githubusercontent.com/MitchellAW/MitchellAW.github.io/refs/heads/master/images/nothing-at-all.gif

Credits

Creators and contributors of Frinkiac, Morbotron, Master of All Science, 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.3.8.tar.gz (17.1 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.3.8-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: compuglobal-0.3.8.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for compuglobal-0.3.8.tar.gz
Algorithm Hash digest
SHA256 541cfc8337748bcc8ac6b24a8cc42ef19291d6f4d8099258137a13196b02d884
MD5 58498863e42275464d0abe9d333ce1f1
BLAKE2b-256 c8eb39b991e0061d0867e4b3583bb682fe490d591509c9fc9a5bf04fb020b6a0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: compuglobal-0.3.8-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for compuglobal-0.3.8-py3-none-any.whl
Algorithm Hash digest
SHA256 04d5dbc5dea4bd52f04329e4797031d59d0f59a0fb999fa55c88a0b75dd247d4
MD5 50c9b0ac3f6be57c352b4488495cc2fd
BLAKE2b-256 1d1c0507c8d27ea8557345f88b04b741df7582bddc5dbba4954073acd9628a4b

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