Skip to main content

DiSwarm

Discord-based Swarm Protocol Library

Usage

Main class: Swarm

Initialize like so: swarm = Swarm(discord channel id: str, discord bot token: str, swarm id: str)

Sending message to swarm: swarm.send(string message)

Getting messages from swarm: swarm.get_queue() returns a list of (timestamp, decoded message) tuples from your swarm members

Important:

Before you end your program, call swarm.end() to cleanly end the discord bot process

Notes

  • Swarm ID: the same for all bots in your swarm, but it should be unique from any other swarm, at least on your swarm channel. To be safe, use a randomly generated string or number. Make sure every bot in your swarm has the same id, because bots with different ids cannot see eachother's messages.
  • get_queue() will only return messages from your swarm, so you can have multiple swarms in the same channel.
  • DiSwarm uses Fernet encryption, provided by the cryptography library. Install this library through pip install cryptography.
  • Also requires pip install discord

Metadata

Release files for DiSwarm 2.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for DiSwarm 2.2.0
File Size Uploaded
DiSwarm-2.2.0.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for DiSwarm 2.2.0
File Interpreter ABI Platform
DiSwarm-2.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.4 kB

Release files / DiSwarm-2.2.0.tar.gz

Download URL DiSwarm-2.2.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
923017530d8f1d0abfeb055a9e95461f47890ca6c9628945c15ee9eb2d45b200
BLAKE2b-256 checksum
How to use checksums
68f056646080925f89cbe9c89df2df167226c3f266b907b5248a058ec6d757e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.5.4

Release files / DiSwarm-2.2.0-py3-none-any.whl

Download URL DiSwarm-2.2.0-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f4d7f230eae9eda7ef521f8fde44fc4b95eb21f56d816268e16c3c928613816
BLAKE2b-256 checksum
How to use checksums
9f4aeb6c4aa16ba3fd884933fc262265f1c9f5c4b5e10f5a654f8a8c5e4ce7c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.5.4

Release history Release notifications | RSS feed

This release

2.2.0 This release

2 release files

2.1.9

2 release files

2.1.8

2 release files

2.1.7

2 release files

2.1.6

2 release files

2.1.4

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page