Skip to main content

Description

This is a Python wrapper for the unofficial Xbox API

Build Status

Installation

For now you will have to install manually, as I didn't upload the initial version to pypi (pip).

  1. Clone this repo
  2. Place the xboxapi directory in your project

The only dependency is requests library.

Usage

This is a basic example of how to create a client and fetch a gamers profile information from their gamertag.

from xboxapi import Client

client = Client(api_key=<api_key>)
gamer = client.gamer('voidpirate')

profile = gamer.get('profile')

Client class constructor takes the following optional arguments except api_key.

Argument Value Short Description
api_key string api token from Xbox API
timeout int how long until the request times out (seconds)
lang string country language code (e.g. for German (de-DE))

Client class public methods.

Method Value Optional Short Description
gamer(gamertag=<string>) string xuid=<string> gamertag to lookup
calls_remaining() n/a n/a Return headers about api rate limits

A note about the gamer method. If you already know the gamers xuid you can use that instead to avoid an additional api call when using only a gamertag.

Gamer class public methods, returned from gamer method in Client.

Method Value Optional Short Description
get(method=<string>) string term=<string> API calls.
send_message(message=<string>) string n/a Send a message to gamer
send_activity(message=<string>) string n/a Update your activity feed with a message

Pagination is supported in this client and all handled through get method. It works by detecting the response header for pagination, any subsequent calls to the same api endpoint will return paged data. If another api call is made to a different endpoint, the pagination token will be cleared and results will not be paged.

Metadata

Release files for xboxapi 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xboxapi 2.0.1
File Size Uploaded Provenance Actions
xboxapi-2.0.1.tar.gz 6.0 kB Without provenance Details for xboxapi-2.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for xboxapi 2.0.1
File Interpreter ABI Platform Actions
xboxapi-2.0.1-py3-none-any.whl Python 3 none any Details for xboxapi-2.0.1-py3-none-any.whl

Total release size: 12.0 kB

Release files / xboxapi-2.0.1.tar.gz

Download URL xboxapi-2.0.1.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6034a3c67574d2f065f5f9b68291a771e81d337c35fffa57578c5267939378cf
BLAKE2b-256 checksum
How to use checksums
6872a5f198e1f9c9f73b2058b25eed965418140ca427d636a2513603b574e934
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3

Release files / xboxapi-2.0.1-py3-none-any.whl

Download URL xboxapi-2.0.1-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
04f0e8ff650e0fb9dc3fe921cba86a538170a7a77467f3ca51c422d98d69d758
BLAKE2b-256 checksum
How to use checksums
30134990dec608534df315ac1d6ba66fc57cc7a86804966e4bc22ec3e233eb8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.3

Security for xboxapi 2.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page