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.

Last updated

Was this helpful?