Skip to main content

A Python wrapper for the FIVEM API.

Project description

FiveM-Api

Small API Wrapper for interacting with the FiveM API

How-to install :

pip install fivem

How-to use :

import fivem

server = fivem.getServer("88.214.59.183:30120")
print(server.players)

Display the number of players online on a server

fivem.getServer("ip-address:port") # default port is 30120

Returns a Server Class with those attributes:

players: [{
        "endpoint"; string,
        "id": int, // The server ID og the player
        "identifiers": array, // Identifiers of the player
        "name": string, // Username's player
        "ping": int, // Le ping
}],
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)
},
name: string // Name of the server

This API is loosely based on the node.js Fivem API.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

fivem-1.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file fivem-1.0-py3-none-any.whl.

File metadata

  • Download URL: fivem-1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for fivem-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5f5ebff6c91dd5a0cd66389ebb3bc34e3f13b334fd58dcad6ad75752ee80f545
MD5 35ffd4c90d77e96a34ebdd7678522f42
BLAKE2b-256 dcb6104c861c40295cb66df9ed1297f514b9b9aa4d734be8976bb58203e393b2

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