Docs 1.0.0PyPIPython
Examples
Labs API for Python, v1
Basic Usage
Example of listing bots and getting a specific bot.
Python
1from labs import LabsApiClient23with LabsApiClient() as client:4 bots = client.list_bots(limit=5)5 print(f"Found {len(bots)} bots")67 bot = client.get_bot_by_id("123456789012345678")8 print(f"Bot name: {bot['name']}")
Updating Statistics
How to periodically update your bot's statistics.
Python
1from labs import LabsApiClient23with LabsApiClient() as client:4 client.post_stats(5 bot_id="YOUR_BOT_ID",6 guild_count=1200,7 user_count=45000,8 uptime=864009 )
Asynchronous Implementation
Using the AsyncLabsApiClient for better performance.
Python
1import asyncio2from labs import AsyncLabsApiClient34async def main():5 async with AsyncLabsApiClient() as client:6 res = await client.get_website_stats()7 print(res)89asyncio.run(main())
Need more help?
Ask in our Discord or email support@conscherry.com.