Skip to main content

cuju-gfootball

cuju-gfootball lets code written for Google Research Football, GRF, import cuju's port of GRF under GRF's own names. With it installed, import gfootball imports cuju.gfootball, and gfootball_engine and _gameplayfootball import cuju.gfootball_engine, so GRF's scripts, GRF's tests, the gfootball: ids of gym and tools built on GRF, such as Kaggle's football environment, run on cuju with every line as it was.

pip install cuju-gfootball

pip install cuju installs cuju-gfootball next to the engine, and pip install cuju-gfootball does the same. Each release of cuju-gfootball depends on the range of cuju-engine whose module names it maps, cuju-engine 0.3 for this one.

What the alias does

cuju already holds GRF's Python package as cuju.gfootball, its files GRF's own with only their import lines changed, over cuju.gfootball_engine, an engine module with the names, types and behaviour of GRF's compiled one. Code that imports cuju.gfootball runs on cuju without the alias. The alias serves the code that cannot change its imports, a library that imports gfootball deep inside, a test suite that should stay byte for byte as GRF ships it, or a pickle written by GRF.

Each of GRF's names is the very module of cuju, not a copy. gfootball.env.football_env is cuju.gfootball.env.football_env holds, so a setting changed through one name is seen through the other, and importlib.util.find_spec('gfootball') and from gfootball.scenarios import * work as they do in GRF.

The classes of the port carry GRF's module names as well. CoreAction reports the module gfootball.env.football_action_set, and the enumerations of the engine report _gameplayfootball, as GRF's do. Python's pickle writes those names, so a dump or a state written through the port opens in GRF, and a dump of GRF opens in the port. Without the alias the port's dumps name cuju.gfootball, which GRF cannot import, and GRF's dumps name gfootball, which the port's readers cannot import, so the alias is the piece that lets dumps travel both ways between Python environments. cuju's own readers, cuju.dumps.read_dump, cuju replay and cuju dump-to-txt, read either kind with or without it.

How it activates

The wheel holds a file cuju_gfootball.pth, which Python's site module runs at every start of the interpreter. It places one import finder at the front of sys.meta_path and imports nothing else, so the start of Python stays as fast as before. The finder answers only for GRF's names and for the modules of the port, and it decides whether to activate at the first import of one of them.

An interpreter started with python -S skips .pth files, and there import cuju_gfootball activates the alias. The modules of the port imported before that point receive GRF's module names at the activation.

Beside an install of GRF

GRF and cuju-gfootball both claim the name gfootball, and GRF's install always keeps it. At the first import of one of the names, the alias looks for GRF in three places: a gfootball, gfootball_engine or _gameplayfootball that any other finder can import, which covers regular and editable installs and folders on PYTHONPATH, and the installed distribution gfootball. When it finds any of them, it activates nothing, cuju.gfootball keeps its own module names, and one RuntimeWarning names what it found. Installing GRF after cuju-gfootball has the same effect at the next start of Python.

The command python -m cuju_gfootball prints whether the alias is active and the reason where it is not, and exits with status 1 in that case. In code, cuju_gfootball.active() and cuju_gfootball.status() say the same.

To keep both GRF and cuju in one environment, leave cuju-gfootball out and import the port as cuju.gfootball. To have the alias, uninstall GRF's gfootball.

Uninstalling

pip uninstall cuju-gfootball removes the package, its .pth file and its metadata, and leaves cuju as it was. The next start of Python imports cuju.gfootball under its own names again.

Documentation and license

Migrating from GRF describes the port, the alias and what changes for code written for GRF, and Differences from GRF lists every behaviour of cuju that departs from GRF. cuju-gfootball is cuju's own code, under the Apache License 2.0, and holds none of GRF's files.

Metadata

Release files for cuju-gfootball 0.1.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 cuju-gfootball 0.1.0
File Size Uploaded Provenance Actions
cuju_gfootball-0.1.0.tar.gz 9.5 kB With provenance Details for cuju_gfootball-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cuju-gfootball 0.1.0
File Interpreter ABI Platform Actions
cuju_gfootball-0.1.0-py3-none-any.whl Python 3 none any Details for cuju_gfootball-0.1.0-py3-none-any.whl

Total release size: 20.7 kB

Release files / cuju_gfootball-0.1.0.tar.gz

Download URL cuju_gfootball-0.1.0.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
50a378e4807b8aef04aaa1510dc28655d5d8ca63f5706246d03440229acf0ac5
BLAKE2b-256 checksum
How to use checksums
df6a2519bd963dbfcc495c3288033a962c7e7ea72af07788f3e2247e5663f9c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / cuju_gfootball-0.1.0-py3-none-any.whl

Download URL cuju_gfootball-0.1.0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d88b31e02d36b7abc08d52a4f7a851d2b92ebb1c502587a99a5038ab6e76232
BLAKE2b-256 checksum
How to use checksums
6e18234db005ee4368e1169febe661f955cc1def72575403aa22fb78f85ffd53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Security for cuju-gfootball 0.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cuju_gfootball-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

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