EcoNuker API
  • Welcome
  • Ratelimits
  • Auth Tokens
  • Items
  • Servers
  • Bot Information
  • Testing
  • Quickstart
    • Examples - Python
    • Examples - JS
Powered by GitBook
On this page
  • Python Example
  • Python Async Example
  1. Quickstart

Examples - Python

Examples of using the EcoNuker API.

PreviousTestingNextExamples - JS

Last updated 2 years ago

Notice: is unavailable until June 1, 2023. For now, use

Python Example

Installation

pip install econuker

Code

# Python Example
from econuker import Client
beta = True # False
authtoken = None # "your auth token here"

if __name__ == "__main__":
    client = Client(auth_token=authtoken, beta=beta)
    status = client.status()
    print(status.name)

Python Async Example

Installation

pip install econuker

Code

# Python Async Example
from econuker import AsyncClient
beta = True # False
authtoken = None # "your auth token here"

if __name__ == "__main__":
    client = AsyncClient(auth_token=authtoken, beta=beta)
    async def asyncfunction():
        status = await client.status()
        print(status.name)
        return status
    asyncio.run(asyncfunction())
econuker.xyz/api
beta.econuker.xyz/api