Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Ferks-FK/Control-Wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Control-Wrapper


Discord Contributors

What is this?

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.

Project Status

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.

How to install/Upgrade

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

Usage Examples

Get all 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()
    print(users)
    
    return users
 
asyncio.run(get_users())

Get specific user using filters

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())

Available Endpoints

Currently only a few endpoints are available, the rest will be implemented as the project develops. You can see the endpoints in the Docs.

About

A simple Async API Wrapper for ControlPanel.gg.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages