A Python wrapper for the IW4M-Admin API
Project description
hop on brownies :)
IW4M - Admin Wrapper 🎮
An easy-to-use Python wrapper for interacting with the IW4M-Admin
Introduction
Welcome to the official wiki for the IW4M-Admin Wrapper! This wrapper allows you to easily interact with the IW4M-Admin server through simple Python Functions. Whether you're server staff or a developer, this wrapper will simplify your interactions with IW4M-Admin, enabling you to manage players, retrieve statistics, and much more 📊
Table of Contents
Server Class 💻
The Server class provides utility functions for interacting with the IW4M-Admin servers
Methods
-
status()
Retrieves the current status of the server- Returns:
(dict)- The status information from the server in JSON format.
- Returns:
-
info()
Retrieves the server information.- Returns:
(dict)- Information about the server in JSON format.
- Returns:
-
get_server_ids()
Retrieves a list of available servers and their corresponding IDs.- Returns:
(list)- A list of dictionaries, each containing:- server (str): The name of the server
- id (str): The unique identifier for the server
- Returns:
-
send_command(command: str)
Executes an iw4m-admin console command and returns the response.- Parameters:
command (str)- The command to execute. - Returns:
(str)- Response from the server. - Raises: Exception if the request fails.
- Parameters:
-
read_chat()
Retrieves chat messages from the server.- Returns:
(list)- A list of tuples, each containing the sender's name and their message.
- Returns:
-
recent_clients(offset: int = 0)
Retrieves a list of recent clients.- Parameters:
offset (int, optional)- The offset for pagination (default is 0). - Returns:
(list)- A list of dictionaries containing details about recent clients.
- Parameters:
-
find_player(name: str = "", xuid: str = "", count: int = 1, offset: int = 0, direction: int = 0)
Finds players on the server by name or XUID.- Parameters:
name (str, optional): The player's namexuid (str, optional): The player's XUIDcount (int, optional): Number of players to return (default is 1)offset (int, optional): Offset for pagination (default is 0)direction (int, optional): Search direction (default is 0)
- Returns:
(str)- The response from the server containing player information.
- Parameters:
-
get_users()
Retrieves a list of users with their corresponding links.- Returns:
(list)- A list of tuples, each containing:- player (str): The name of the user
- href (str): The corresponding link of the user
- Returns:
-
get_players()
Retrieves a list of players with their roles and corresponding links.- Returns:
(list)- A list of dictionaries, each containing:- role (str): The role of the player (e.g., owner, senior, admin, user)
- name (str): The name of the player
- url (str): The corresponding link to the player
- Returns:
-
get_roles()
Retrieves a list of available roles on the server.- Returns: A list of roles available.
-
get_admins(role: str = "all", count: int = None)
Retrieves a list of administrators based on their role.- Parameters:
role (str): The role to filter by (default is "all")count (int, optional): The number of admins to return (default is unlimited)
- Returns: A list of dictionaries containing details about the administrators.
- Parameters:
-
get_audit_logs()
Retrieves a list of audit logs from the server.- Returns: A list of dictionaries containing:
- type (str): The type of the audit log entry
- origin (str): The origin of the log
- href (str): The link to the log
- Returns: A list of dictionaries containing:
Player Class 🕹️
The Player class provides utility functions for interacting with players on the IW4M-Admin server
Methods
-
stats()
Retrieves statistics about the player.- Returns:
(dict)- Player statistics in JSON format.
- Returns:
-
advanced_stats()
Retrieves advanced statistics for the player.- Returns:
(dict)- Advanced player statistics in JSON format.
- Returns:
-
client_info()
Retrieves the client's information.- Returns:
(dict)- Client information in JSON format.
- Returns:
-
info()
Retrieves the basic information about the player.- Returns:
(dict)- Player information in JSON format.
- Returns:
-
chat_history()
Retrieves the player's chat history.- Returns:
(list)- A list of chat messages sent by the player.
- Returns:
-
name_changes()
Retrieves the history of the player's name changes.- Returns:
(list)- A list of previous names.
- Returns:
-
administered_penalties()
Retrieves the penalties administered to the player.- Returns:
(list)- A list of administered penalties.
- Returns:
-
received_penalties()
Retrieves the penalties the player has received.- Returns:
(list)- A list of received penalties.
- Returns:
-
connection_history()
Retrieves the player's connection history to the server.- Returns:
(list)- A list of connection events.
- Returns:
-
permissions()
Retrieves the permissions assigned to the player.- Returns:
(list)- A list of permissions.
- Returns:
Come Play on Brownies SND 🍰
### Why Brownies? 🤔 - **Stability:** Brownies delivers a consistent, lag-free experience, making it the perfect choice for players who demand uninterrupted action - **Community:** The players at Brownies are known for being helpful, competitive, and fun—something Orion can only dream of - **Events & Features:** Brownies is constantly running unique events and offers more server-side customization options than Orion, ensuring every game feels freshBrownies Discord | Brownies IW4M | Made With ❤️ By Budiworld
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iw4m-0.3.5.tar.gz.
File metadata
- Download URL: iw4m-0.3.5.tar.gz
- Upload date:
- Size: 23.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
527e63a93adb434943ce8772b436e5e7d2aad13de23ecd746021ed7412422ae7
|
|
| MD5 |
14b7b0950a2267ec3368eabfe694b863
|
|
| BLAKE2b-256 |
a039a92789764b42a48bda4788abd4b44c6d5bf9571eba10c1b3fd72b2101ec9
|
File details
Details for the file iw4m-0.3.5-py3-none-any.whl.
File metadata
- Download URL: iw4m-0.3.5-py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb55988d99e444e5ca43b2b641231bb9d42be127acc68ebb90ac28ea78e5a9bb
|
|
| MD5 |
ddd37bde6e4b63d3b4d2b3351b808471
|
|
| BLAKE2b-256 |
527e2fc26d0ca95b62a930ba0b49bd0506f689b0773bb77dde362ae5056d9b3b
|