Skip to main content

glass_onion

PyPI Latest Release

Table of Contents

Summary

Glass Onion aims to do one thing -- synchronizing soccer data object identifiers -- extremely well. Currently, this package supports the following objects:

Object All Considered Columns "Higher-Order" Object Type(s) Notes
Match match_date, matchday, home_team_id, away_team_id Competitions, Seasons, Teams Works best with a single competition.
Team team_name Competitions and Seasons Works best with a single competition.
Player jersey_number, team_id, player_name, player_nickname, birth_date Teams Works best within a single match.

Any identifiers other than the ones being synchronized are assumed to be universal across data providers (e.g. team_id when synchronizing players). Why? Each object type depends on a "higher-order" object type to have unified identifiers in order to reduce the search space of potential matches (more details in Integrating Glass Onion: Step 2). Having unified competitions and seasons unlocks the synchronizations for teams, which unlocks that process for matches, and the same for players. When building an object identifier sync pipeline, there are a bunch of other tasks that you may need to do that Glass Onion does not provide support for: deduplication, false positive detection, etc. A example workflow can be found in the integration guide. Our Getting Started page provides a simpler example that allows you to get up and running with Glass Onion quickly.

Please note: this package simply combines common synchronization techniques to get the closest match for two objects from different data providers. The accuracy of these matches is not necessarily guaranteed. Please review matches for accuracy (either as part of your pipeline or manually).

Installation

The source code is hosted on GitHub at: https://github.com/USSoccerFederation/glass_onion.

The easiest way to install Glass Onion is via uv or pip:

uv install glass_onion
pip install glass_onion

You can also install the package from GitHub for the latest updates:

uv pip install "git+https://github.com/USSoccerFederation/glass_onion"
pip install git+https://github.com/USSoccerFederation/glass_onion.git

For more details, refer to the installation guide.

Documentation

Please see the docs.

Background

The idea for this package and its public release started with this 2022 blog post by @UnravelSports. Identifier synchronization is one of the most common problems that soccer analytics groups run into, mostly because it seems unique to soccer (at least, across the major sports): in other (read: American) sports, the organizing body (NFL, MLB, NBA, etc) uniquely identifies players and forces (or at least seems to) data providers to use those identifiers in their datasets. Every club that has multiple data subscriptions has to build their own solution to this problem (or manually synchronize players via spreadsheet) that fits into their ETL system, but few are publicly discussed and open-source (the main exception being that of Parma Calcio in Italy: https://github.com/parmacalcio1913/players-matcher).

Our hope is this package will help new data analysts and analytics groups get up to speed more quickly and deliver more robust reports that integrate all of their data sources.

Methodology

Please see the docs.

Contributing

All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. More information can be found in the contributing guide.

License

Glass Onion is distributed under the terms of the BSD 3 license.

Why the name Glass Onion?

Syncing identifiers is often fragile because of the human error involved in recording object names and metadata. It also often takes multiple approaches layers to synchronize objects. So: glass onion.

Metadata

Release files for glass-onion 1.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 glass-onion 1.1
File Size Uploaded Provenance Actions
glass_onion-1.1.tar.gz 32.0 kB Without provenance Details for glass_onion-1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for glass-onion 1.1
File Interpreter ABI Platform Actions
glass_onion-1.1-py3-none-any.whl Python 3 none any Details for glass_onion-1.1-py3-none-any.whl

Total release size: 68.1 kB

Release files / glass_onion-1.1.tar.gz

Download URL glass_onion-1.1.tar.gz
Size 32.0 kB
Tags Source
SHA-256 checksum
How to use checksums
734fbe3beda7b14d8060ab27028bac83dc72c041a5539a74428fccfcb4d13926
BLAKE2b-256 checksum
How to use checksums
fd5646a138dfc5259eaaf74d26aa8f7231ff4110881ed62532561c1905379abe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","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 / glass_onion-1.1-py3-none-any.whl

Download URL glass_onion-1.1-py3-none-any.whl
Size 36.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40bc1149a7a397975e079de087d71f503e204b266a24f4a60d7409b57455abaf
BLAKE2b-256 checksum
How to use checksums
af08213b6dfbebeb018d37381b8622a24e537b23c2260c9975a5106408d12ba2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","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}

Security for glass-onion 1.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.

Release history Release notifications | RSS feed

This release

1.1 This release

2 release files No provenance

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