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_v2-2.0.1.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

pyerlc_v2-2.0.1-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file pyerlc_v2-2.0.1.tar.gz.

File metadata

  • Download URL: pyerlc_v2-2.0.1.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.1

File hashes

Hashes for pyerlc_v2-2.0.1.tar.gz
Algorithm Hash digest
SHA256 66e09a4b79d71010e2cc628eb24822ef752eb44d21aa682f06fa48740c4451c1
MD5 2a669800d1c88a1d410d6a79ab3d2213
BLAKE2b-256 68bd5617651b0ed6e954ad03110dcc1fe1628c8e2258da499925d27827152177

See more details on using hashes here.

File details

Details for the file pyerlc_v2-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyerlc_v2-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.1

File hashes

Hashes for pyerlc_v2-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b0939bdb509796b5a67c30ff5fd31997cde033c7d2cd83607981119dd8592fc9
MD5 a886739c9f66a61ad4a5665042f4c12d
BLAKE2b-256 f30159119fcfeb3bb1ff9254611a2c82fcee5165fd6881cf2b652d4d4ca12e60

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