Skip to main content

PureSkill.gg CS:GO Data Science Development Kit

PyPI GitHub Actions

Counter-Strike helpers for CSDS match data (a manifest plus one pandas DataFrame per channel). scrub_csds_pii anonymizes a match before it leaves the platform, and pop_overtime removes overtime rounds from a channel. It works on data you have already loaded, usually with pureskillgg-dsdk.

Installation

Requires Python 3.11 or later.

$ uv add pureskillgg-csgo-dsdk

It does not install pureskillgg-dsdk. The example below loads the match with it, so add it too:

$ uv add pureskillgg-dsdk

Usage

Scrub a match, then pop overtime:

from pureskillgg_dsdk import DsReaderS3, GameDsLoader
from pureskillgg_csgo_dsdk import (
    csds_pii_channel_instructions,
    pop_overtime,
    scrub_csds_pii,
)

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

# Load only the PII channels this CSDS has, then scrub them.
data = loader.get_channels(csds_pii_channel_instructions(loader.manifest))
manifest = scrub_csds_pii(loader.manifest, data)  # data is scrubbed in place

# CS2 regulation is 24 rounds (MR12). The default, 30, is CS:GO MR15.
deaths = loader.get_channel({"channel": "player_death"})
overtime = pop_overtime(deaths, max_rounds_csgo=24)  # deaths keeps rounds 1-24

scrub_csds_pii returns the new manifest. It replaces the job id with the anonymous id, redacts names, clan tags, chat, share codes and demo ids, maps each Steam id to a letter, zeroes pings, caps inflated win and commend counts, and marks every changed column in the manifest. docs/scrub-csds-pii.md lists every field.

pop_overtime returns the removed rows with their original index labels. Rows with a missing round stay. A channel without a round column raises MissingColumns.

Exports

Export

Used by

scrub_csds_pii, SCRUB_CSDS_PII_CHANNEL_INSTRUCTIONS

csgo-ppp’s scrubber

csds_pii_channel_instructions

no consumer yet; prefer it to the constant, which names channels an older CSDS may not have

pop_overtime

csgo-coach’s economy course

MissingColumns, UnsupportedChannelStructure

raised when a DataFrame lacks a required column

Development

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

$ git clone https://github.com/pureskillgg/csgo-dsdk.git
$ cd csgo-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-csgo-dsdk 3.2.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-csgo-dsdk 3.2.0
File Size Uploaded
pureskillgg_csgo_dsdk-3.2.0.tar.gz 7.8 kB Details

Built distribution (wheel)

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

Total release size: 19.3 kB

Release files / pureskillgg_csgo_dsdk-3.2.0.tar.gz

Download URL pureskillgg_csgo_dsdk-3.2.0.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b572de3b9921ee1ee2a247c25e124168327981a729dc764cfbccb7496668719b
BLAKE2b-256 checksum
How to use checksums
5167a2d812f9d8aac628ef2a2f02feb1e78beb1641d17c33813a2c2fe2df9af6
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_csgo_dsdk-3.2.0-py3-none-any.whl

Download URL pureskillgg_csgo_dsdk-3.2.0-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb5bca997f89bacea4f913543cb38bcfda991f23c1b7c710f8d40ec9d2eee4bd
BLAKE2b-256 checksum
How to use checksums
49b82559754c1e6c2b77ee79eabdbe0a3d6db94d8e9a6938d46054169f97a847
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

3.5.0

2 release files

3.4.0

2 release files

3.3.2

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

This release

3.2.0 This release

2 release files

3.1.1

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.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.10.0

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.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