Control-Wrapper is an Async API Wrapper written in Python for the ControlPanel API. This is intended to make CPGG API calls easier to use for any endpoint.
Currently this project is being maintained by Ferks-FK, and is in its initial stage (Alpha), so any bugs or problems you find, please open an issue on github. So far, this package is not on PyPi because it is still in its early stages.
At the moment you can test this package by installing the development version. You will need GIT installed to use the commands below.
To install:
pip install git+https://github.com/Ferks-FK/Control-Wrapper@development
To upgrade:
pip install --force-reinstall --no-deps git+https://github.com/Ferks-FK/Control-Wrapper@development
from control_wrapper import ControlWrapper as CPGG
import asyncio
api = CPGG("https://mydomain.com", "my token")
async def get_users():
users = await api.user.list_users()
print(users)
return users
asyncio.run(get_users())
from control_wrapper import ControlWrapper as CPGG
import asyncio
api = CPGG("https://mydomain.com", "my token")
async def get_users():
users = await api.user.list_users(name="ferks", email="test@test.com", includes=['servers'])
print(users)
return users
asyncio.run(get_users())
Currently only a few endpoints are available, the rest will be implemented as the project develops. You can see the endpoints in the Docs.