Skip to main content

A simple tool to utilize the YGOProDeck API as a Python module

Project description

pygo_API

Python Module to access the YGOProDeck API

Usage

import pygo_API

use to include the module

image = pygo_API.APIImageLookUp("normal", "kuriboh").getImage()

Saves the image of "Kuriboh" in the variable image as well as caching it.

print(pygo_API.APILookUp(name="kuriboh").getData())

Prints the entire data of "kuriboh".

Examples

tcg = pygo_API.APILookUp().getData()

print(tcg)

Print all Cards

WARNING

The above output is a JSON dict with roughly 670000 lines so be carefull with generic API requests

dragons = pygo_API.APILookUp(fname="dragon", linkmarker="bottom,top,left").getData()

Saves all Linkmonsters with "dragon" in their name and Linkarrows pointing to the bottom, top and left to the "dragons" variable.

staples = pygo_API.APILookUp(staple="yes").getData()

print(staples)

Prints every card considered a staple by YGOProDeck

tcg = pygo_API.APILookUp(banlist="tcg", startdate="2020-01-01", enddate="2024-01-01").getData()

Get all cards added to the tcg banlist between first of january 2020 and the first of january 2024

Caching

Every API request is cached for the duration of the program or script.

Alternatavly you can use:

pygo_API.Cache().clear_cache()

to clear the cache mid code.

The cachfile is stored as the URL encrypted to SHA-256

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

pygo_api-0.0.1.tar.gz (5.6 kB view details)

Uploaded Source

File details

Details for the file pygo_api-0.0.1.tar.gz.

File metadata

  • Download URL: pygo_api-0.0.1.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.1

File hashes

Hashes for pygo_api-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2e042545384feeeaf7d2b19e79c9bea5ed469b4ff3384a6d6eefbf5c58debd1c
MD5 7e75f8e81bf5c10e2a5bc0129e0be88d
BLAKE2b-256 f7e839391f8a20e891def6e2e9771f59bffc8acac52382fd71c099ea1e117a68

See more details on using hashes here.

Supported by

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