Skip to main content

A dynamic, auto-updating Python wrapper for the Moan API suite.

Project description

Moan API Python Client (Dynamic Version)

A simple and intuitive Python wrapper for the Moan API.

This package features a dynamic loader for its API modules and an automatic update checker.

Installation

Install the package directly from PyPI:

pip install moanapi

Usage

First, import and initialize the client with your API key. It's conventional to name the client instance moan.

import moanapi

try:
    moan = moanapi.Client(api_key="YOUR_API_KEY")

    # Get an anime quote
    quote = moan.utility.get_quote(category="anime")
    print(quote['quote'])

    # Get Roblox user info
    user = moan.roblox.get_user_info(user_id=261)
    print(f"Username: {user['data']['username']}")
    
    # Generate an image with AI
    image_data = moan.generative.get_flux_image(prompt="a powerful cat wizard")
    print(f"Image URL: {image_data['image_url']}")

    # Generate a rankcard (returns raw image bytes)
    image_bytes = moan.generative.generate_rankcard(
        username="Zlan", avatar="AVATAR_URL", current_xp=900, 
        next_level_xp=1000, level=24, rank=1
    )
    with open("rankcard.png", "wb") as f:
        f.write(image_bytes)

except moanapi.APIError as e:
    print(f"An API error occurred: {e}")

For a full list of available functions and to check for new updates, use the built-in help function:

import moanapi

moanapi.help()

License

This project is licensed under the MIT License.

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

moanapi-0.3.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

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

moanapi-0.3.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file moanapi-0.3.0.tar.gz.

File metadata

  • Download URL: moanapi-0.3.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for moanapi-0.3.0.tar.gz
Algorithm Hash digest
SHA256 1bb16e56b41f3613f3287acf2bb3430ab87ea5b4eb72a39835cc519959b2211a
MD5 e47fba1c8cb9d64d8d066478b71b590e
BLAKE2b-256 23eaaab21b5cf7341635b18d6a23810322eeb8895499242c79daf31e6f6fe6bc

See more details on using hashes here.

File details

Details for the file moanapi-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: moanapi-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for moanapi-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c014d0d24ff56f44297e76e519612d084d0da52b3ccaae2f201177feae390afa
MD5 f9370e5f86abc30adc20e88dca0ef616
BLAKE2b-256 86eb3178c1244d11e39d3c68fbf766d893eb6ee5129c5583d364a605e91ab3e2

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