Skip to main content

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 asyncio et aiohttp pour des performances élevées.
  • Temps Réel : Connexion WebSocket persistante avec gestion automatique des reconnexions.
  • Système de Commandes : Extension commands puissante (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

velmu-1.0.6.tar.gz (45.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

velmu-1.0.6-py3-none-any.whl (52.8 kB view details)

Uploaded Python 3

File details

Details for the file velmu-1.0.6.tar.gz.

File metadata

  • Download URL: velmu-1.0.6.tar.gz
  • Upload date:
  • Size: 45.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for velmu-1.0.6.tar.gz
Algorithm Hash digest
SHA256 0e0ffc23344be95bd0dec4b87f8a5cfc1d45e45c48d81c1b839067fd7b1e87c5
MD5 a3f56db71100809b23ea478fd2f60310
BLAKE2b-256 10183d2b535bec123e1992e266c19289f3d9be5384b2bd51254d279ed63f1619

See more details on using hashes here.

File details

Details for the file velmu-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: velmu-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 52.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for velmu-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 995e8448053b64764afebd76563d73a25de1e63f061b989595d1f5d8d6b066ce
MD5 4f2aa08a79866bd94426e8e699d3c8d8
BLAKE2b-256 94effee3afd928d52f4f6c983fb344e1e42d4b66402c70c2b8310c0b2a9b4775

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page