Skip to main content

A Python wrapper for the ERLC PRC API

Project description

pyerlc

pyerlc is a lightweight Python wrapper for the Emergency Response: Liberty County (ERLC) Police Roleplay Community (PRC) API. It allows you to interact programmatically with your PRC server, providing access to live server data and admin controls.

Features

  • ✅ Get server status
  • 👥 Fetch player lists and join logs
  • 🔫 Retrieve kill and command logs
  • 🚓 View active vehicles and bans
  • 🛑 See moderation calls and queue status
  • 🧠 Run in-game commands remotely

Installation

pip install pyerlc

Requires: Python 3.12 or higher

Usage

from pyerlc import PRCClient

client = PRCClient(server_key="your_server_key", global_api_key="your_global_api_key")

# Get server status
status = client.get_server_status()
print(status)

# Run an in-game command
response = client.run_command("announce Hello from pyerlc!")
print(response)

Please only use a 'global_api_key' if you have been provided with one.

API Methods

Method Description
get_server_status() Returns general info about the server
get_players() Lists all players currently online
get_join_logs() Returns recent player join logs
get_kill_logs() Returns recent player kill logs
get_command_logs() Lists executed commands
get_mod_calls() Shows active mod calls
get_queue() Lists users in the server queue
get_bans() Retrieves the ban list
get_vehicles() Lists vehicles currently spawned
run_command(command: str) Runs a command on the server

Error Handling

All methods return a dictionary with the following structure:

{
    "success": True or False,
    "status_code": 200,
    "data": {...} or None,
    "error_message": "Optional error message",
    "error_code": 0  # only present if returned by the API
}

Contributing

Contributions are welcome! Submit a PR or open an issue on GitHub.

Links

License

This project is licensed under the MIT License.


Built and maintained with 💙 by epell Development Product of Australia 🇦🇺

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

pyerlc-1.1.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

pyerlc-1.1.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file pyerlc-1.1.0.tar.gz.

File metadata

  • Download URL: pyerlc-1.1.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for pyerlc-1.1.0.tar.gz
Algorithm Hash digest
SHA256 ab5f73c37b84128c80f2b8bd98b111a6acb669f50eebc538de746ce4252002e4
MD5 a75f1d511756d6bde8deb18bb0cbcdae
BLAKE2b-256 d1a3fc897a2d1331e33ad43365c1b5189950c582302d3a16fd6dee062ca9a9e5

See more details on using hashes here.

File details

Details for the file pyerlc-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyerlc-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for pyerlc-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13513ebdf35343212b41a3d25642b3a813fcb20d0b0e612a6fadc0aa3a02bbe6
MD5 bf97cc506306387cde782c83c01e3fd3
BLAKE2b-256 7a7303cf826c3a89298187a7048056217712c597bb98460096b1d5a6202f5c14

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