Skip to main content

A Python wrapper for the Fluxer API

Project description

fluxer.py

A Python API wrapper for Fluxer.

Build bots and automated clients with a clean, type-safe, and event-driven architecture.


Features

  • Async-first design built on asyncio
  • REST API support with automatic rate limiting
  • WebSocket gateway for real-time events
  • Command framework with decorators
  • Modular cog system
  • Strongly-typed data models
  • Structured error handling and retry logic
  • Clean separation between low-level Client and high-level Bot

Installation

pip install fluxer.py

Requires Python 3.10 or higher.

For development:

git clone https://github.com/akarealemil/fluxer.py.git
cd fluxer.py
pip install -e .

Quick Start

A simple bot with a ping command:

import fluxer

bot = fluxer.Bot(command_prefix="!", intents=fluxer.Intents.default())

@bot.event
async def on_ready():
    print(f"Bot is ready! Logged in as {bot.user.username}")

@bot.command()
async def ping(ctx):
    await ctx.reply("Pong!")

if __name__ == "__main__":
    TOKEN = "your_bot_token"
    bot.run(TOKEN)

Choosing Between Bot and Client

Bot

Use Bot if you need: - Decorator-based commands - Built-in command parsing - Cog support - Rapid bot development

Client

Use Client if you need: - Full event-driven control - A custom command framework - Lower-level API interaction - Advanced or specialized implementations


Architecture Overview

Bot extends Client, adding a command framework on top of the core event system.

Core components:

  • HTTPClient -- Handles REST requests and rate limits
  • Gateway -- Manages WebSocket connection and event dispatch
  • Client -- Base event-driven interface
  • Bot -- High-level command framework
  • Cog -- Modular command grouping system

Data Models

fluxer.py provides strongly-typed models representing Fluxer entities:

  • Guild
  • Channel
  • Message
  • User
  • GuildMember
  • Webhook
  • Embed
  • Emoji

Models encapsulate both state and behavior, exposing convenience methods such as:

  • Message.reply()
  • Channel.send()
  • Guild.kick_member()

Intents

Intents determine which events your application receives from the WebSocket gateway.

Common usage:

fluxer.Intents.default()
fluxer.Intents.all()

Limiting intents improves performance and ensures your application subscribes only to necessary events.


Exceptions

All library exceptions inherit from:

FluxerException

Errors include:

  • HTTP errors mapped to REST status codes
  • Gateway protocol errors
  • Connection and retry-related failures

Documentation

Full documentation is available at:

https://deepwiki.com/akarealemil/fluxer.py/1-overview


Contributing

We use uv for dependency management.

git clone https://github.com/akarealemil/fluxer.py.git
cd fluxer.py
uv sync --dev

This will create a .venv and install development dependencies.

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

fluxer_py-0.3.2.tar.gz (47.2 kB view details)

Uploaded Source

Built Distribution

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

fluxer_py-0.3.2-py3-none-any.whl (54.0 kB view details)

Uploaded Python 3

File details

Details for the file fluxer_py-0.3.2.tar.gz.

File metadata

  • Download URL: fluxer_py-0.3.2.tar.gz
  • Upload date:
  • Size: 47.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for fluxer_py-0.3.2.tar.gz
Algorithm Hash digest
SHA256 9ee36e57aec319a86b43cf42910da253bfcdb877809162986bbb829339aebe03
MD5 c729dde71f6435da97efa6d3d81a75a8
BLAKE2b-256 9df6f87a16172699ec3acc3ef915d1b9f8a52c13be35c7a9f4c33a9e44ee1e00

See more details on using hashes here.

File details

Details for the file fluxer_py-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: fluxer_py-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 54.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for fluxer_py-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 913da75921e3863c681071b769838a0f3b4cc5f191bf8e0112fb3a4df5294daa
MD5 795855f8a9f75d5da7c2d01c10b843ad
BLAKE2b-256 b5dbcda0fae988118d5ec784c933b053ac7d0c31d59617b54b82aaebfb1733dc

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