semvec/pypi-packages huggingface dataset:
zyntra.py 0.1.0
Bot library for Zyntra
Requires Python: >=3.9

# zyntra.py

> [!warning]
> This library is in beta, expect weird things to happen.
> API changes may also not reflect instantly.


An unofficial bot library for making bots in [Zyntra](https://zyntra.gg), written for Python.

# Usage
Download the library using `pip`:
```
pip install zyntra.py
```

Create a bot at [the developer site](https://zyntra.gg/developers/applications), you can view [this guide](https://zyntra.gg/developers/documentation/bots).

**Atleast Python 3.9 or higher is required in order to use this library.**

# Bot Example
> [!note]
> If you're used to [discord.py](https://github.com/Rapptz/discord.py), then this should be mildly similar.
```python
from zyntra import *
from zyntra.utils.color import Color

# ID = Bot ID
# Optionally, you can set a prefix using prefix="prefix!"
client = Client(TOKEN, ID)

# If a user tries to run a command that's currently on cooldown.
@client.on_cooldown()
async def on_cooldown(command: CommandData, channel: Channel, remaining: float):
    await channel.send(f"⏳ Command `{command.name}` is on cooldown!\nTry again in **{remaining:.2f}** second(s).")

# Once the client logs in.
@client.on_ready()
async def ready():
    print("Client is ready!")

# Once the client's socket connects
@client.on_socket_connect()
async def connect():
    print("Connected to socket!")

# When a message is created.
@client.on_message_create()
async def on_message(msg: Message):
    print(msg.content)

# Registers an echo command (Order: name, description, cooldown in seconds)
@client.command("echo", "Echoes text.", 1)
async def echo(ctx: Interaction, args: list):
    await ctx.reply(" ".join(args))

# A help command displaying all the commands.
@client.command("help", "Gets all commands")
async def help(ctx: Interaction, args: list):
    cmds = [f"`{client.prefix}{command.name}` - {command.description}" for command in client.commands]

    embed = Embed(
        title=f"Commands",
        description="\n".join(cmds),
        color=Color.get_color("green"),
        footer=f"There are currently {len(cmds)} command(s)!"
    )
    await ctx.reply(embed=embed)

# Starts the main bot loop
client.start()
```

# Currently supported events:
- `on_message_create` (Socket.IO name: messageCreate) - Occurs when a message is created.

- `on_socket_connect` (Socket.IO name: join) - Occurs when the bot connects to the socket.

- `on_ready` - Occurs when everything is done successfully.

- `on_cooldown` - Occurs when a user tries to run a command that is on cooldown.
bloonspy 0.10.0
A Python wrapper for the Ninja Kiwi Open Data API
Requires Python: >=3.10

# BloonsPy

[![Documentation Status](https://readthedocs.org/projects/bloonspy/badge/?version=latest)](https://bloonspy.readthedocs.io/en/latest/?badge=latest)
[![PyPI](https://img.shields.io/pypi/v/bloonspy)](https://pypi.org/project/bloonspy/)

BloonsPy is a Python wrapper for the [Ninja Kiwi Open Data API](https://data.ninjakiwi.com/),
that makes you write more readable code and handles rate limiting automatically.
It also renames cryptic variable names so you can know what you're doing while coding.

## Installing

**Python 3.10 or higher is required**

```bash
python3 -m pip install bloonspy
```

## Quick example

```python
from bloonspy import Client

boss_event = Client.bosses()[0].standard()
boss_standard_top_3 = boss_event.leaderboard()[:3]
for player in boss_standard_top_3: 
    print(f"{player.name} - {player.score}")
```

## Resources
+ [Documentation](https://bloonspy.readthedocs.io/en/latest/)
+ [Github](https://github.com/SartoRiccardo/bloonspy)