Skip to main content

Asynchronous Python wrapper for BenBot API.

Project description

BenBotAsync

Python wrapper for the BenBot API.

Downloads Requires: Python 3.x BenBot Version: 1.0.1

Installing:

Synchronous: Deprecated, use the async version.

Windows: py -3 -m pip install BenBot
Linux/macOS: python3 -m pip install BenBot

Asynchronous:

Windows: py -3 -m pip install BenBotAsync
Linux/macOS: python3 -m pip install BenBotAsync

Examples:

import BenBotAsync
import asyncio


async def ben_search():
    result = await BenBotAsync.get_cosmetic(
        lang="en",
        searchLang="en",
        matchMethod="full",
        name="Ghoul Trooper"
    )

    print(result.id)

loop = asyncio.get_event_loop()
loop.run_until_complete(ben_search())

This would output:
CID_029_Athena_Commando_F_Halloween

fortnitepy example:

import fortnitepy
import BenBotAsync


client = fortnitepy.Client(
    auth=fortnitepy.EmailAndPasswordAuth(
        email='example@email.com',
        password='password123'
    )
)


@client.event
async def event_friend_message(message: fortnitepy.FriendMessage) -> None:
    args = message.content.split()
    split = args[1:]
    content = " ".join(split)

    if args[0] == '!skin':
        skin = await BenBotAsync.get_cosmetic(
            lang="en",
            searchLang="en",
            matchMethod="contains",
            name=content,
            backendType="AthenaCharacter"
        )

        await client.user.party.me.set_outfit(asset=skin.id)


client.run()

You can check out the documentation for BenBotAsync here.

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

BenBotAsync-3.0.1.tar.gz (6.7 kB view hashes)

Uploaded Source

Built Distribution

BenBotAsync-3.0.1-py3-none-any.whl (8.4 kB view hashes)

Uploaded Python 3

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