Skip to main content

Asynchronous wrapper for Pacifices Cloud.

Project description

Version 1 is not compatible with 0.1.0

Index

Install

  • Pypi: pip3 install aiopes
  • Git: pip3 install git+https://github.com/WardPearce/aiopes.git

Example

import asyncio
import aiopes


PES = aiopes.client(
    api_key="..."
)


async def example():
    try:
        async for data, server in PES.servers():
            print(data.id)
            server_target = server
    except aiopes.exceptions.InvalidAuthorization:
        print("Invalid API Key.")
    else:
        async for location in PES.locations():
            print(location.city)

        async for group in PES.mapgroups():
            print(group.name)

            for map_details in group.maps():
                print(map_details.name)

        print(await PES.mods())

        print(await PES.plugins())

        print(await PES.tickrates())

        async for gamemode in PES.gamemodes():
            print(gamemode.name)

        async for file in PES.files():
            print(file.name)

        if await PES.validate.settings(rcon="new_rcon"):
            print("Setting is valid")

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

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

aiopes-1.0.0.tar.gz (7.2 kB view hashes)

Uploaded Source

Built Distribution

aiopes-1.0.0-py3-none-any.whl (23.0 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