Skip to main content

gocart

gocart is a python package and command-line suite used to consume GCN Kafka streams.

Documentation for gocart is hosted by Read the Docs (development version and main version). The code lives on github. Please report any issues you find here.

Features

  • Listen to GCN Kafka streams (currently LIGO-Virgo-KAGRA only) and write alerts and skymaps to the local filesystem.
  • Ability to 'echo' the Kafka stream by re-listening to the last N days of alerts (provided the alerts are still hosted on the GCN Kafka cluster).
  • Alert content, FITS Header data and some extra value-added event parameters are written to a single machine-readable YAML file.
  • The healpix skymaps are optionally converted to ascii files (one row per healpix pixel) and/or rendered as aitoff plots.
  • Create your own plugin scripts to run whenever an alert is parsed.
  • works well in conjunction with skyTag.

Installation

The easiest way to install gocart is to use conda:

conda create -n gocart python=3.9 pip gocart -c conda-forge
conda activate gocart

To upgrade to the latest version of gocart use the command:

conda upgrade gocart -c conda-forge

It is also possible to install via pip if required:

pip install gocart

Or you can clone the github repo and install from a local version of the code:

git clone git@github.com:thespacedoctor/gocart.git
cd gocart
python setup.py install

To check installation was successful run gocart -v. This should return the version number of the install.

Initialising gocart

Before using gocart you need to use the init command to generate a user settings file. Running the following creates a yaml settings file in your home folder under ~/.config/gocart/gocart.yaml:

gocart init

The file is initially populated with gocart's default settings which can be adjusted to your preference.

If at any point the user settings file becomes corrupted or you just want to start afresh, simply trash the gocart.yaml file and rerun gocart init.

GCN Kafka Credentials

When you first come to use gocart, you will need to add a GCN Kafka Client ID and Secret to the gocart.yaml settings file. To get these credentials you will need to signup for a GCN Notices account here.

Once signed in, fill in a suitable name for your new client (any name will do, so gocart is as good a name as any). Fill in the captcha and click 'Create New Credentials'.

In the 'Customize Alerts' section, don't be concerned about what Notice Types to select as these are only used to generate template code in the next section. Not selecting any is fine. Click the 'Generate Code' button. You will now be presented with your newly created client credentials within the body of the code snippet:

Open your gocart settings file at ~/.config/gocart/gocart.yaml and copy and paste these credentials into the appropriate place.

Don't worry about the group_id parameter, it's initially set to XXXX but gocart will replace this with a unique value when it's first run. It is this group_id that allows GCN Kafka to remember which alerts you have or have not heard before. Note the example client above has been deleted, so the credentials quoted here will not work.

You are now ready to start using gocart.

SkyTag

gocart works very well in conjunction with skyTag, a tool to 'annotate' transient sources or galaxies with the percentage credibility region they reside within on a given HealPix sky map.

How to cite gocart

If you use gocart in your work, please cite using the following BibTeX entry:

@software{Young_gocart,
  author = {Young, David R.},
  doi = {10.5281/zenodo.7970742},
  license = {GPL-3.0-only},
  title = {{gocart. A GCN Kafka stream consumer and filter}},
  url = {https://zenodo.org/doi/10.5281/zenodo.7970742}
}

Metadata

Release files for gocart 0.4.9

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

Source distribution (sdist)

Source distribution for gocart 0.4.9
File Size Uploaded
gocart-0.4.9.tar.gz 264.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gocart 0.4.9
File Interpreter ABI Platform
gocart-0.4.9-py3-none-any.whl Python 3 none any Details

Total release size: 532.6 kB

Release files / gocart-0.4.9.tar.gz

Download URL gocart-0.4.9.tar.gz
Size 264.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e6c6d1350eafb1b9508135b50032476ee543198ff8773e292e43fd8a3edc547d
BLAKE2b-256 checksum
How to use checksums
3e59e04f8179f74ed99d93784b37803c5a36e3a5670ad437b99daacfd92ee77d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 12, 2026.

Transparency log

Release files / gocart-0.4.9-py3-none-any.whl

Download URL gocart-0.4.9-py3-none-any.whl
Size 267.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
35026cb55edf91314e92feac7c3e4d75879327736af07405ab4926edab4a8fd6
BLAKE2b-256 checksum
How to use checksums
537ad565acf014f3d101abb84ceb99f1f07888332e208efbaf0672f13e10d615
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.9 This release

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

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