Skip to main content

A Python wrapper for the IW4M-Admin API

Project description

http://152.53.132.41:1624 Hop on brownies :)

IW4M-Admin Wrapper 🎮

An easy-to-use Python wrapper for interacting with 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 a simple Python interface. Whether you're server staff or a developer, this wrapper simplifies your interactions with IW4M-Admin, enabling you to manage players, retrieve statistics, and more. 📊


Setting up iw4m

you need to get your iw4m server's URL in this case it would be http://152.53.132.41:1624

setting_up_1 setting_up_2 setting_up_3 setting_up_4


Example Usage

from iw4m import IW4MWrapper
from os import environ

iw4m = IW4MWrapper(
    base_url  = environ['IW4M_URL'],   # your server URL
    server_id = environ['IW4M_ID'],    # your server ID
    cookie    = environ['IW4M_HEADER'] # your IW4M-Admin cookie
)

# Creating an instance of Server class
server = iw4m.Server(iw4m) 

# Creating an instance of Player class
player = iw4m.Player(iw4m)

# Creating an instance of Command class
commands = iw4m.Commands(iw4m)

print(server.get_players())
# [
#    {'name': '[BSTR]FuRioSa_', 'role': 'user', 'url': '/Client/Profile/1480'},
#    {'name': 'BDQ', 'role': 'user', 'url': '/Client/Profile/455'},
#    {'name': 'LetikTV', 'role': 'user', 'url': '/Client/Profile/870'},
#    {'name': 'ziad_mohamed_6', 'role': 'user', 'url': '/Client/Profile/3835'}
# ]

print(player.info("1480"))
# {
#    'guid': '7062D',
#    'ip_address': '88.XX.XXX.XXX',
#    'level': 'User',
#    'link': 'http://152.53.132.41:1624/Client/Profile/1480',
#    'name': '[BSTR]FuRioSa_',
#    'old_ips': ['88.XX.130.XXX'],
#    'stats': {'Connections': '17',
#           'Hidden Ingame': 'Is not',
#           'Kills Per Death': '1.17',
#           'Last Map Played': 'Nuketown 2025',
#           'Last Server Played': 'Brownies Nuketown Sniper SND',
#           'Overall Ranking': '#56 of 138',
#           'Score Per Minute': '747.8',
#           'Total Deaths': '763',
#           'Total Kills': '889'},
#   'vpn_whitelist': False
# }

print(commands.privatemessage("[BSTR]FuRioSa_", "Bubi betta"))
# '[]' For some reason commands just return an empty list

Explore More

You can find additional example usages in the examples/ directory

For further information, check out the official wiki (coming soon...)


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 fresh

Brownies Discord | Brownies IW4M | Made With ❤️ By Budiworld

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iw4m-0.3.8.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iw4m-0.3.8-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file iw4m-0.3.8.tar.gz.

File metadata

  • Download URL: iw4m-0.3.8.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for iw4m-0.3.8.tar.gz
Algorithm Hash digest
SHA256 a1cd8534865561c5051520979ad10aa317368eb9123903af49d8e572e64fe493
MD5 2cafb3ab5349c9d842b0c881bda49420
BLAKE2b-256 b1581b9d4e8705a6b2416afe4988a859cd50f85a16b0734e44d0942f100e3f55

See more details on using hashes here.

File details

Details for the file iw4m-0.3.8-py3-none-any.whl.

File metadata

  • Download URL: iw4m-0.3.8-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for iw4m-0.3.8-py3-none-any.whl
Algorithm Hash digest
SHA256 14cb1b8bfa58f2f08ff50d5be373bc8c56c56c8fdb11ed25cc89f00ddb684542
MD5 2cbbd9d9d0b74478d5239dcdbbbe4b31
BLAKE2b-256 3edd39a30f76e767449ee7a8372b12535f542f39458f0c2645e3542d1c84e3b3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page