Skip to main content

A python wrapper for FiveM

Project description

FiveMpy

A python wrapper in order to interact with FiveM API & FiveM servers

How-to install :

pip install fivempy

How-to use : There is two class : Server and Fivem

Server

import fivempy

server = fivempy.Server("ip:port")
#default port is 30120

It initialize a Server Class with those attributes:

players: [{
        "endpoint"; string,
        "id": int,
        "identifiers": array,
        "name": string,
        "ping": int,
}],
info: {
    "enhancedHostSupport": boolean,
    "icon": string, // Icon of the server (Base64)
    "resources": array, // All started resources
    "server": string, // FXServer's version (string format)
    "vars": { // Some convars defined in server.cfg
        "sv_enhancedHostSupport": boolean,
        "sv_lan": boolean,
        "sv_licenseKeyToken": string,
        "sv_maxClients": int,
        "sv_scriptHookAllowed": boolean,
        "sv_hostname": string,
    },
    "version": int, // FXServer's version (numeric format)
},
dynamic: {
    "clients": int, // number of online player
    "gametype": string,
    "hostname": string,
    "iv": string, // FXServer's version (string format)
    "mapname": string,
    "sv_maxclients": string // number of maximum players
},
ip : string, // server's ip:port
player_count: int, // number of online players
player_max: int, // number of maximum players
player_list: list // list of online players

Fivem

import fivempy

fivem = fivempy.Fivem()

It initialize a Fivem Class with those attributes:

status: {
    "indicator": string, // "none", "minor", "major", or "critical"
    "description": string // "All Systems Operational", "Partial System Outage", or "Major Service Outage"
},
forum_status, policy_status, cnl_status, keymaster_status, serverlist_status, runtime_status: {
    "name": string, // names of different components
    "status": string, // operational, degraded_performance, partial_outage, or major_outage
    "description": string, // description of the service
}

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

fivempy-0.2.6.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

fivempy-0.2.6-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file fivempy-0.2.6.tar.gz.

File metadata

  • Download URL: fivempy-0.2.6.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for fivempy-0.2.6.tar.gz
Algorithm Hash digest
SHA256 247a20965683ff1878c07217a146e755823fc02a6665e5f81c6f249c8c077052
MD5 7df6f4cf58c389bacedc9ac15d2c867e
BLAKE2b-256 2fd7a85f7ebf6724946ba1fb8eac96c509c8c3ed16fe59b80c0b5ce002e307e4

See more details on using hashes here.

File details

Details for the file fivempy-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: fivempy-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for fivempy-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1bccd0160a1ebd2569e63b7ac75d7a677a6a659edec6149a6b51957969673f20
MD5 becd3fb06506f624da9b2c9613d4d654
BLAKE2b-256 a9c36a0b71af01cd7fe1b3ac9b6c1e5227a146f184ae12c933e26c6fcd1c5bc7

See more details on using hashes here.

Supported by

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