Skip to main content

omniplex-sdk

The official Python SDK for Omniplex. Post your bot's or server's stats, check whether someone has voted, and verify the webhooks Omniplex sends you.

  • Sync (Omniplex) and async (AsyncOmniplex) clients, built on httpx.
  • Works with discord.py, nextcord, disnake, hikari and anything else.
  • Typed, with TypedDicts for votes and webhook events.
  • Retries rate-limited requests using the API's Retry-After header.
pip install omniplex-sdk

Python 3.11 or newer. The package installs as omniplex-sdk and imports as omniplex.

Getting a token

Posting stats needs an API token for your bot or server. Open your dashboard, pick the bot or server, and create one under API sessions. Reading public data and checking votes don't need a token.

Keep the token secret, for example in an environment variable.

Posting stats

import os
from omniplex import AsyncOmniplex

omniplex = AsyncOmniplex(os.environ["OMNIPLEX_TOKEN"])

await omniplex.post_bot_stats(servers=len(bot.guilds), shards=bot.shard_count or 1, status="online")

Or let the SDK post for you. It posts once straight away, then every 30 minutes, in a background task you can cancel:

import discord
from omniplex import AsyncOmniplex

class Bot(discord.Client):
    async def setup_hook(self):
        self.omniplex = AsyncOmniplex(os.environ["OMNIPLEX_TOKEN"])
        self.omniplex.auto_post_bot_stats(
            lambda: {"servers": len(self.guilds), "shards": self.shard_count or 1}
        )

status is optional and reports your bot's presence (online, idle, dnd or offline). Omniplex keeps showing the last value you posted, so post it regularly if you use it.

For a server, use a server token and post_server_stats(total_members=..., online_members=...).

Checking votes

from omniplex import Omniplex

with Omniplex() as omniplex:
    if omniplex.has_voted(bot_id, user_id):
        ...  # reward them

    vote = omniplex.get_bot_vote(bot_id, user_id)
    print(vote["wait"])  # how long until they can vote again

has_voted_for_server and get_server_vote do the same for servers. Every method exists on both clients, with await on AsyncOmniplex.

Webhooks

Omniplex can call your server when someone votes for or reviews your bot or server. Set a secret on the webhook in your dashboard and choose HMAC signature. The SDK also verifies the older splashtail and simple-auth methods.

Always verify the request, using the raw body. Omniplex occasionally sends one signed with the wrong secret to check that your endpoint rejects it, so return 401 when verification fails.

from fastapi import FastAPI, Request, Response
from omniplex import WebhookVerificationError, verify_webhook

app = FastAPI()

@app.post("/omniplex")
async def omniplex_webhook(request: Request):
    try:
        event = verify_webhook(await request.body(), request.headers, SECRET)
    except WebhookVerificationError:
        return Response(status_code=401)

    if event["type"] == "NEW_VOTE" and not event["data"]["downvote"] and not event["data"]["auto"]:
        await reward_voter(event["creator"]["id"])
    return Response(status_code=204)

With Flask, pass request.get_data() and request.headers.

Events

event["type"] event["data"]
NEW_VOTE votes, per_user (2 on a double-vote weekend), downvote, auto (cast by Auto-vote)
NEW_REVIEW review_id, content, stars, owner_review
EDIT_REVIEW review_id, stars and content as {"old", "new"}, owner_review
DELETE_REVIEW review_id, content, stars, owner_review
TEAM_EDIT name, short, tags, extra_links and nsfw as {"old", "new"}

Every event also has creator (who did it), targets (the bot, server or team) and metadata (created_at in seconds, and test for test sends).

Errors

Failed requests raise OmniplexError with the HTTP status, the API's message, any validation context and retry_after in seconds when you're rate limited.

Options

Omniplex(
    token=None,                         # needed for posting stats
    base_url="https://api.omniplex.gg", # the default
    max_retries=2,                      # retries for rate limits and failed GETs
    timeout=10.0,
    http_client=None,                   # bring your own httpx.Client
)

Metadata

Release files for omniplex-sdk 0.1.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 omniplex-sdk 0.1.0
File Size Uploaded Provenance Actions
omniplex_sdk-0.1.0.tar.gz 12.5 kB With provenance Details for omniplex_sdk-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for omniplex-sdk 0.1.0
File Interpreter ABI Platform Actions
omniplex_sdk-0.1.0-py3-none-any.whl Python 3 none any Details for omniplex_sdk-0.1.0-py3-none-any.whl

Total release size: 22.9 kB

Release files / omniplex_sdk-0.1.0.tar.gz

Download URL omniplex_sdk-0.1.0.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bb145ff851d84b3de4b5a71d0440822a5f3bc3392dc1f3923f1dd5e79297bb5f
BLAKE2b-256 checksum
How to use checksums
f3518bc531e9293725e3f85ced342e4d8ab4938b7bac3c5d17b6d7fef21b3ac8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Release files / omniplex_sdk-0.1.0-py3-none-any.whl

Download URL omniplex_sdk-0.1.0-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab203b2295502370eb14049a6ba4b970a6335f936dc94a9c11ff8d4b9be46a19
BLAKE2b-256 checksum
How to use checksums
7b3ef87676263628860d6696d47837cdf58ca97b1c59d31e59bd4c808d6a300d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Security for omniplex-sdk 0.1.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for omniplex_sdk-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

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

0.1.0 This release

2 release files Full 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