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.1.tar.gz (33.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.1-py3-none-any.whl (38.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: velmu-1.0.1.tar.gz
  • Upload date:
  • Size: 33.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.1.tar.gz
Algorithm Hash digest
SHA256 a84366952b5b7951bb337c75f0d4a5e99ba047ac3ee626245f87a03870a23721
MD5 93edb0535728d9ff14e4d446aa8374a2
BLAKE2b-256 9945136bcd783d88e40eb8cb736f7d4e384388053d5691fca6c6b6915d66f181

See more details on using hashes here.

File details

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

File metadata

  • Download URL: velmu-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 38.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 35bece79e41e9aee7d247a0a2a64eac8cc46c41fe0c4e9975c00acdbb32ec578
MD5 51894a598ecefa1b036200804bbaa365
BLAKE2b-256 ffaebfc6e8292aee8b82447f45282e9dcf2575b6e099d3f37e7963adbeab7787

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