Aio-Votifier

An asynchronous MInecraft server votifier client in Python
Example Usage:
from aiovotifier import VotifierClient
import asyncio
async def main():
client = VotifierClient("127.0.0.1", 8192, "testservicename", "token/rsa key")
# VotifierClient.vote(...) automatically determines the protocol and key format
await client.vote("username", "user address")
await client.vote("user2")
await client.v1_vote("username", "user address") # only supports v1 protocol
await client.nu_vote("username", "user address") # only supports NuVotifier/v2 protocol
asyncio.run(main())
Documentation
class aiovotifier.VotifierClient(host: str, port: int, service_name: str, secret: str)
- Arguments:
host: str- The hostname or IP of the votifier serverport: int- The port of the votifier server, commonly 8192service_name: str- The name of the service that sends the votesecret: str- The public RSA key or the token found inconfig.yml
- Methods:
vote(username: str, user_address: str = "127.0.0.1")- sends a vote to the votifier server, automatically detects and handles the protocol and type of secretv1_vote(username: str, user_address: str = "127.0.0.1")- sends a Votifier v1 vote to a votifier v1 servernu_vote(username: str, user_address: str = "127.0.0.1") -> dict- sends a NuVotifier / v2 vote to a NuVotifier server, returns the response from the server
class aiovotifier.VotifierHeader(header: bytes, version: str, token: str = None)
- Arguments:
header: bytes- The header received from the votifier serverversion: str- The version of the votifier serverchallenge: str = None- The challenge, included only if the votifier server is v2/NuVotifier
- Methods:
@classmethod parse(header: bytes)- Returns a newVotifierHeader, parsed from the input bytes
function aiovotifier.votifier_v1_vote(r: asyncio.StreamReader, w: asyncio.StreamWriter, service_name: str, username: str, user_address: str, key: cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicKey)
- Sends a Votifier v1 vote to a Votifier v1 server
function aiovotifier.nuvotifier_vote(r: asyncio.StreamReader, w: asyncio.StreamWriter, service_name: str, username: str, user_address: str, token: str, challenge: str) -> dict
- Sends a NuVotifier / v2 vote to a NuVotifier server
exception aiovotifier.VotifierError
- Base class that all votifier exceptions derive from
exception aiovotifier.VotifierHeaderError
- Raised when the header from the votifier server is invalid
exception aiovotifier.UnsupportedVersionError
- Raised when the votifier version is unsupported
exception aiovotifier.NuVotifierResponseError
- Raised when the response from the votifier server contains a status that is not OK
Credits
aiovotifier was based off the code and documentation below
Metadata
Release files for aiovotifier 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aiovotifier-1.1.0.tar.gz | 4.7 kB | Without provenance | Details for aiovotifier-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aiovotifier-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for aiovotifier-1.1.0-py3-none-any.whl |
Total release size: 10.8 kB
Release files / aiovotifier-1.1.0.tar.gz
| Download URL | aiovotifier-1.1.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e72dbb4bea45e9ef85bf8dca2d8ffb22d53142dc9f6d0cebaac16b97da328390
|
|
BLAKE2b-256 checksum How to use checksums |
cdbff39bfaa27c1fc0259209b691b90ec38a33297a90ce190f9dad4f3f114b64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.10.7 Darwin/25.2.0
|
Release files / aiovotifier-1.1.0-py3-none-any.whl
| Download URL | aiovotifier-1.1.0-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
94fae36de3012e31d0e5caabde5e56c3eadd15892bb4ccf1e5e29725abcf8d87
|
|
BLAKE2b-256 checksum How to use checksums |
bb06e45b4be9f9b20f06dad1ca822db304532e5013c2606b6302208f8f482fc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.10.7 Darwin/25.2.0
|
Security for aiovotifier 1.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.
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.