Skip to main content

Welcome to SportsX SDK Documentation

Overview

The STX SDK is a wrapper around the Sportsx Graphql APIs and Phoenix channels. The SDK provides object-oriented APIs to connect with the available Sportsx APIs and socket channels. The SDK is built on the following libraries:

Compatibility

This library is compatible with the following versions of Python:

  • 3.7
  • 3.8
  • 3.9

Developer Guide:

Detailed developer guide and demo scripts are available on this link

There are two services available StxClient and StxChannelClient

  • StxClient provides sync operations, while
  • StxChannelClient provides connectivity with websocket channels.

Steps to build python package and upload to PyPI

Some commands require a newer version of pip, so start by making sure you have the latest version installed:

  • For Linux/Mac:

    python3 -m pip install --upgrade pip

  • For Windows:

    py -m pip install --upgrade pip

Setting up build package version

Open pyproject.toml file and update the version field with the new version name.

Generating distribution archives (built package)

The next step is to generate distribution packages for the package. These are archives that are uploaded to the Python Package Index and can be installed by pip.

Make sure you have the latest version of PyPA’s build installed:

  • For Linux/Mac:

    python3 -m pip install --upgrade build

  • For Windows:

    py -m pip install --upgrade build

Now run the following command from the root directory where pyproject.toml is located:

  • For Linux/Mac:

    python3 -m build

  • For Windows:

    py -m build

This command should output a lot of text listing all the packaged files and once completed should generate two files in the dist directory:

dist/
    ├── stx_pysdk-VERSION_NUMBER-py3-none-any.whl
    └── stx-pysdk-VERSION_NUMBER.tar.gz

The tar.gz file is a source distribution whereas the .whl file is a built distribution. Newer pip versions preferentially install built distributions, but will fall back to source distributions if needed.

Uploading the distribution archives (built package)

Finally, it’s time to upload your package to the Python Package Index!

You’ll need to install Twine if not already installed, reinstalling it makes sure you have the latest version Twine is used to upload the distribution packages.

  • For Linux/Mac:

    python3 -m pip install --upgrade twine

  • For Windows:

    py -m pip install --upgrade twine

Once installed, run Twine to upload all the archives under dist:

  • For Linux/Mac:

    python3 -m twine upload --repository pypi dist/*

  • For Windows:

    py -m twine upload --repository pypi dist/*

You will be prompted for a username and password.

After the command completes, you should see output similar to this:

Uploading distributions to https://pypi.org/legacy/
Enter your username: <USERNAME>
Enter your password: <PASSWORD>
Uploading stx_pysdk-VERSION_NUMBER-py3-none-any.whl
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.2/8.2 kB • 00:01 • ?
Uploading stx-pysdk-VERSION_NUMBER.tar.gz
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.8/6.8 kB • 00:00 • ?

Once uploaded, your package should be viewable on PyPI; https://pypi.org/project/stx-pysdk/

Metadata

Release files for stx-pysdk 1.0.19

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

Source distribution (sdist)

Source distribution for stx-pysdk 1.0.19
File Size Uploaded Provenance
stx_pysdk-1.0.19.tar.gz 48.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for stx-pysdk 1.0.19
File Interpreter ABI Platform
stx_pysdk-1.0.19-py3-none-any.whl Python 3 none any Details

Total release size: 94.4 kB

Release files / stx_pysdk-1.0.19.tar.gz

Download URL stx_pysdk-1.0.19.tar.gz
Size 48.7 kB
Tags Source
SHA-256 checksum
How to use checksums
49a74dc827c49ca6f3644af5bec0be164380adcd192e930f883acc052f129957
BLAKE2b-256 checksum
How to use checksums
8c88cc67a0412a4f8b7dbe65f8b661c2f7f998007274ae76692f55b13bec0c1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / stx_pysdk-1.0.19-py3-none-any.whl

Download URL stx_pysdk-1.0.19-py3-none-any.whl
Size 45.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4216c749c0b8ee18d0adb8f655009cc1040f6ecbcb966ccaf8d0972a1e4ec474
BLAKE2b-256 checksum
How to use checksums
3ae73f3a0a3481010a790de1b2af6c478535f6a4f996789b1a35250594a9b93e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for stx-pysdk 1.0.19

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