Skip to main content

PureSkill.gg Data Science Development Kit

PyPI GitHub Actions

The shared Python toolkit behind PureSkill.gg’s Counter-Strike data pipeline. It reads parsed matches (CSDS: a JSON manifest plus one parquet file per channel) from S3 or disk into pandas, consumes SQS work queues, loads models from S3 or SageMaker, builds multi-match datasets (“tomes”), and exports AWS Data Exchange revisions. It is a library only: every bucket, queue and dataset is an argument you pass in.

Installation

Requires Python 3.11 or later.

$ uv add pureskillgg-dsdk

The s3_xgboost model type needs the xgboost extra:

$ uv add "pureskillgg-dsdk[xgboost]"

Reading tomes into polars (get_dataframe(library="polars") and scan()) needs the polars extra:

$ uv add "pureskillgg-dsdk[polars]"

Usage

Read CSDS channels into DataFrames:

from pureskillgg_dsdk import DsReaderS3, GameDsLoader

reader = DsReaderS3(bucket="my-csds-bucket", manifest_key="path/to/match/csds")
loader = GameDsLoader(reader=reader)

deaths = loader.get_channel(
    {"channel": "player_death", "columns": ["round", "tick", "attacker_id"]}
)
data = loader.get_channels([{"channel": "header"}, {"channel": "round_end"}])

DsReaderFs(root_path=..., manifest_key=...) reads the same layout from disk. Leave out columns to read every column.

Consume an SQS queue:

import structlog
from pureskillgg_dsdk import SqsConsumer

async def handler(content, metadata):
    # content is the message's parsed JSON body.
    return True  # Delete the message. False leaves it for the redrive policy.

consumer = SqsConsumer(
    queue="my-queue", handler=handler, log=structlog.get_logger(), concurrency=4
)
consumer.run()  # Blocks. consumer.start() schedules it on a running loop.

Modules

Module

Main exports

Used by

ds_io

GameDsLoader, DsReaderS3, DsReaderFs

csgo-coach, csgo-ppp, igl-pipeline’s coach_evaluate runner

sqs

SqsConsumer, DeleteMessage, SqsJsonMessageTranslator

csgo-coach, csgo-ppp

ds_models

create_ds_models: SageMaker endpoints, and scikit-learn, XGBoost, DataFrame and hashmap models stored on S3

csgo-coach

tome

TomeCuratorFs, create_tome_curator

the makenew-pyskill template’s notebooks

adx

get_adx_dataset_revisions, download_adx_dataset_revision, and the export_* and *_auto_exporting_* functions

the makenew-pyskill template’s notebooks

pureskillgg-csgo-dsdk uses this package in its tests only.

Documentation

Development

You need Python 3, uv and Git LFS (the test fixtures are in LFS).

$ git clone https://github.com/pureskillgg/dsdk.git
$ cd dsdk
$ git lfs install
$ git lfs pull
$ uv sync

The tasks are in the Makefile: make lint, make test, make watch (tests on every change) and make format.

Publishing

Set the new version with uv version <version> (or uv version --bump patch), then run make version. It commits pyproject.toml and uv.lock and pushes a signed v* tag, which triggers the publish workflow. Or run the version workflow by hand with a version number or a bump (patch, minor, major); it does both steps.

Publishing needs the PYPI_API_TOKEN repository secret. The version and format workflows also need GH_USER, GH_TOKEN, GIT_USER_NAME, GIT_USER_EMAIL, GPG_PRIVATE_KEY and GPG_PASSPHRASE.

License

MIT. See LICENSE.txt.

Metadata

Release files for pureskillgg-dsdk 4.0.0

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

Source distribution (sdist)

Source distribution for pureskillgg-dsdk 4.0.0
File Size Uploaded
pureskillgg_dsdk-4.0.0.tar.gz 78.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pureskillgg-dsdk 4.0.0
File Interpreter ABI Platform
pureskillgg_dsdk-4.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 186.2 kB

Release files / pureskillgg_dsdk-4.0.0.tar.gz

Download URL pureskillgg_dsdk-4.0.0.tar.gz
Size 78.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a6298feb9c7436b846d9e2f3d19ce9482697affa3d768d2256e3de5237da625c
BLAKE2b-256 checksum
How to use checksums
99a1eb85b25b37f6cf2618b3b6a1ad211524fa61b2b38640aa4e0cc7547b0c9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pureskillgg_dsdk-4.0.0-py3-none-any.whl

Download URL pureskillgg_dsdk-4.0.0-py3-none-any.whl
Size 107.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1931a95da95fa8dd47f080b0a89fa8cd9ba85c4772b33b8f3640db635aa88477
BLAKE2b-256 checksum
How to use checksums
08a78c071015e091e108ff4e3bcb1e82fe272614c590179bd1f38ec0295f3d0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

4.1.1

2 release files

4.1.0

2 release files

4.0.2

2 release files

4.0.1

2 release files

This release

4.0.0 This release

2 release files

3.3.1

2 release files

3.3.0

2 release files

3.2.2

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.0.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

0.31.1

2 release files

0.31.0

2 release files

0.30.0

2 release files

0.29.0

2 release files

0.28.0

2 release files

0.27.0

2 release files

0.26.0

2 release files

0.25.0

2 release files

0.22.1

2 release files

0.22.0

2 release files

0.18.0

2 release files

0.17.0

2 release files

0.16.0

2 release files

0.15.0

2 release files

0.14.0

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.11.0

2 release files

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