Skip to main content

hikari-clusters

pypi pre-commit.ci status

Documentation

hikari-clusters allows you to scale your Discord bots horizontally by using multiprocessing and websockets. This means that your bot can use multiple cores, as well as multiple VPSes.

See the #clusters channel in the hikari-py discord for help.

# brain.py
from hikari_clusters import Brain

Brain(
    host="localhost",
    port=8765,
    token="ipc token",
    total_servers=1,
    clusters_per_server=2,
    shards_per_cluster=3,
).run()
# server.py
from hikari import GatewayBot
from hikari_clusters import Cluster, ClusterLauncher, Server

class MyBot(GatewayBot):
    cluster: Cluster

    def __init__(self):
        super().__init__(token="discord token")

        # load modules & events here

Server(
    host="localhost",
    port=8765,
    token="ipc token",
    cluster_launcher=ClusterLauncher(MyBot),
).run()

Run examples with python -m examples.<example name> (python -m examples.basic)

Creating Self-Signed Certificate:

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout cert.key -out cert.cert && cat cert.key cert.cert > cert.pem

Metadata

Release files for hikari-clusters 1.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 hikari-clusters 1.2.0
File Size Uploaded Provenance Actions
hikari_clusters-1.2.0.tar.gz 16.8 kB Without provenance Details for hikari_clusters-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hikari-clusters 1.2.0
File Interpreter ABI Platform Actions
hikari_clusters-1.2.0-py3-none-any.whl Python 3 none any Details for hikari_clusters-1.2.0-py3-none-any.whl

Total release size: 41.1 kB

Release files / hikari_clusters-1.2.0.tar.gz

Download URL hikari_clusters-1.2.0.tar.gz
Size 16.8 kB
Tags Source
SHA-256 checksum
How to use checksums
035505b285b4eb83eb64bc1cc3f86ba735be20b6ea42db25e3f82e0c50a5ad30
BLAKE2b-256 checksum
How to use checksums
ec7bb0b4161e1cfe72f95bb84c1dab0b05410385c21698fff042f09e62235a6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.9.20 Linux/6.5.0-1025-azure

Release files / hikari_clusters-1.2.0-py3-none-any.whl

Download URL hikari_clusters-1.2.0-py3-none-any.whl
Size 24.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c2defccac73250a0c27267704696d4f6ed2220b01a76b9da0f3730ea8a1ea9f
BLAKE2b-256 checksum
How to use checksums
9b371a572ec1793fe604c15e4da1e7c2803c14541f19ac755d1303a50786a4fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.9.20 Linux/6.5.0-1025-azure

Security for hikari-clusters 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files No provenance

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