Skip to main content

Unofficial API for PloudOS

Project description

PloudOS-API

An unofficial API for PloudOS.

This library contains a lot of functions and is fully asynchronous.

Example

import asyncio
from ploudos import PloudOS

myserverid = 0
ploudos = PloudOS("myusername", "mypassword", myserverid)

async def main():
    await ploudos.login()
    info = await ploudos.get_server_info()
    if info.get("isRunning") is True and info.get("isStarted") is True:
        # It's already started and running
        return
    print(info)
    cr = await ploudos.can_restart()
    print(cr)
    if cr:
        await ploudos.restart()
    else:
        q = await ploudos.queue()
        if q:
            print("Server accepting is necessary. Executing the command.")
            await ploudos.accept_server()
    print(await ploudos.get_server_info())
    await asyncio.sleep(10)
    print(await ploudos.stop())

asyncio.run(main())

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

PloudOS-1.0.1.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

PloudOS-1.0.1-py3-none-any.whl (4.1 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