Skip to main content

Sportsx Python SDK

Project description

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/

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

stx-pysdk-1.0.8.tar.gz (31.7 kB view details)

Uploaded Source

Built Distribution

stx_pysdk-1.0.8-py3-none-any.whl (35.4 kB view details)

Uploaded Python 3

File details

Details for the file stx-pysdk-1.0.8.tar.gz.

File metadata

  • Download URL: stx-pysdk-1.0.8.tar.gz
  • Upload date:
  • Size: 31.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for stx-pysdk-1.0.8.tar.gz
Algorithm Hash digest
SHA256 1cee1787ea7533b0cdc1688b65ecb8942043afe42f350e7ad0a052ccd64bf699
MD5 a10521554ae75d4742b0198c47c37097
BLAKE2b-256 90720ae60216596637827da604c22be69a75e0a7d9b1af9d7213eef1eb587c89

See more details on using hashes here.

File details

Details for the file stx_pysdk-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: stx_pysdk-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 35.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for stx_pysdk-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 74b034cf27e865b2bf450ecc7f38d8e6cf607c09597e31c3d30b558c2caaed0e
MD5 fec062249d55a6c607f665800958dbdc
BLAKE2b-256 4991fa5f01b3edc7c01075b43fcee6d9ba12011f597afcb1d6527a8f9d8eec20

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