A Python wrapper for the Velmu API
Project description
Velmu Python SDK
Une bibliothèque Python moderne, robuste et asynchrone pour interagir avec l'API Velmu et créer des bots puissants.
Fonctionnalités Principales
- 100% Asynchrone : Construit sur
asyncioetaiohttppour des performances élevées. - Temps Réel : Connexion WebSocket persistante avec gestion automatique des reconnexions.
- Système de Commandes : Extension
commandspuissante (inspirée de discord.py) pour créer des bots facilement. - Gestion des Permissions : Système fin de permissions (Bitwise flags) compatible avec l'architecture backend.
- Historique et Pagination : Itérateurs asynchrones performants pour parcourir l'historique des messages.
- Typage Fort : Modèles objets complets (
Member,Role,Guild,Channel) pour une excellente expérience développeur (DX).
Installation
Vous pouvez installer la bibliothèque directement depuis les sources :
pip install .
Démarrage Rapide
Voici un bot minimal utilisant l'extension commands :
import velmu
from velmu.ext import commands
import os
# Configuration
intents = velmu.Intents.default()
intents.message_content = True
bot = commands.Bot(command_prefix='!', intents=intents)
@bot.event
async def on_ready():
print(f'Prêt ! Connecté en tant que {bot.user}')
@bot.command()
async def ping(ctx):
await ctx.reply('Pong ! 🏓')
bot.run("VOTRE_TOKEN")
Exemples
Des exemples complets sont disponibles dans le dossier examples/ :
- basic_bot.py : Bot basique avec commandes simples.
- moderation.py : Démonstration du système de permissions (Kick, Ban, Checks).
- history.py : Utilisation de
ctx.channel.history()pour lire les anciens messages.
Structure du Projet
velmu/: Code source de la bibliothèque.client.py: Client WebSocket et gestion des événements.api.py: Client HTTP REST.ext/commands/: Framework de commandes.models/: Modèles de données (User, Guild, Channel...).
examples/: Scripts d'exemple.
Licence
Distribué sous la licence MIT.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file velmu-1.0.4.tar.gz.
File metadata
- Download URL: velmu-1.0.4.tar.gz
- Upload date:
- Size: 40.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b1f2ff3e64c0521a5e4ea7c90bbe7e821c349f8823e41037a389a68fd36bfc0
|
|
| MD5 |
eb3c1882afd341ada1630bfcfa9f688d
|
|
| BLAKE2b-256 |
2ec7e4f7991d822c143553fc5210f05de0c48b4cf8077ad069c40f54d18c4211
|
File details
Details for the file velmu-1.0.4-py3-none-any.whl.
File metadata
- Download URL: velmu-1.0.4-py3-none-any.whl
- Upload date:
- Size: 46.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
287e0220049bb2e581ed16f400674549934851a32f76aa21b4ab6f163b7a43f8
|
|
| MD5 |
6fab83e8ce8a41764ec3de6d6917d13e
|
|
| BLAKE2b-256 |
fe69e462bfd11f885441329bd3496ecaf408cb5ec3264d4892a7aeb938df6473
|