🐍
KSoftAPI.py
  • KSoftAPI.py
  • Response Types
  • Endpoints
    • Images
    • Bans
    • Kumo
    • Music
Powered by GitBook
On this page

Was this helpful?

KSoftAPI.py

Official Python API Wrapper for api.ksoft.si

Every API call in ksoftapi.py is asynchronous.

As an example, this is how you get a random meme:

import asyncio

import ksoftapi

async def main():
    client = ksoftapi.Client('your-beautiful-token')

    # Catch errors.
    try:
        meme = await client.images.random_meme()
    except Exception as e:
        # Handle possible error.
        print(f'An error occurred: {e}')
        return

    print(meme.image_url)

asyncio.run(main())

In the following documentation, all required arguments will be marked bold.

NextResponse Types

Last updated 4 years ago

Was this helpful?