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.2.tar.gz (39.0 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.2-py3-none-any.whl (45.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: velmu-1.0.2.tar.gz
  • Upload date:
  • Size: 39.0 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.2.tar.gz
Algorithm Hash digest
SHA256 ff085ff3e26121a44bbaf5fd4139f7836a8a2a2ef4f77d9e3778d730de5d3acd
MD5 c9302673cc8cb6c26ffcab47a2771d96
BLAKE2b-256 3da99b3b8aa9ba2aa3f3fbc75f7fac65a2bb1f4b3f184a33ec60bded51daff3c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: velmu-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 45.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fb2c4bf1965412704cbe2c1171ce941147ae1fa514d6922858608f8477e2678b
MD5 f4be924f41e3620642c08ac392c0f796
BLAKE2b-256 b5cfb146c197f4bb825d6ef46f496fbd7939f41a6aa5a35347b740ca8c4235c8

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