Skip to main content

gimie

PyPI version Python Poetry Test docs Coverage Status

Gimie (GIt Meta Information Extractor) is a python library and command line tool to extract structured metadata from git repositories.

Context

Scientific code repositories contain valuable metadata which can be used to enrich existing catalogues, platforms or databases. This tool aims to easily extract structured metadata from a generic git repositories. It can extract extract metadata from the Git provider (GitHub or GitLab) or from the git index itself.


Using Gimie: easy peasy, it's a 3 step process.

1: Installation

To install the stable version on PyPI:

pip install gimie

To install the dev version from github:

pip install git+https://github.com/sdsc-ordes/gimie.git@main#egg=gimie

Gimie is also available as a docker container hosted on the Github container registry:

docker pull ghcr.io/sdsc-ordes/gimie:latest

# The access token can be provided as an environment variable
docker run -e GITHUB_TOKEN=$GITHUB_TOKEN ghcr.io/sdsc-ordes/gimie:latest gimie data <repo>

2 : Set your credentials

In order to access the github api, you need to provide a github token with the read:org scope.

A. Create access tokens

New to access tokens? Or don't know how to get your Github / Gitlab token ?

Have no fear, see here for Github tokens and here for Gitlab tokens. (Note: tokens are as precious as passwords! Treat them as such.)

B. Set your access tokens via the Terminal

Gimie will use your access tokens to gather information for you. If you want info about a Github repo, Gimie needs your Github token; if you want info about a Gitlab Project then Gimie needs your Gitlab token.

Add your tokens one by one in your terminal: your Github token:

export GITHUB_TOKEN=

and/or your Gitlab token:

export GITLAB_TOKEN=

3: GIMIE info ! Run Gimie

As a command line tool

gimie data https://github.com/numpy/numpy

(want a Gitlab project instead? Just replace the URL in the command line)

As a python library

from gimie.project import Project
proj = Project("https://github.com/numpy/numpy")

# To retrieve the rdflib.Graph object
g = proj.extract()

# To retrieve the serialized graph
g_in_ttl = g.serialize(format='ttl')
print(g_in_ttl)

For more advanced use see the documentation.

Outputs

The default output is Turtle, a textual syntax for RDF data model. We follow the schema recommended by codemeta. Supported formats are turtle, json-ld and n-triples (by specifying the --format argument in your call i.e. gimie data https://github.com/numpy/numpy --format 'ttl').

With no specifications, Gimie will print results in the terminal. Want to save Gimie output to a file? Add your file path to the end : gimie data https://github.com/numpy/numpy > path_to_output/gimie_output.ttl

For querying the output of gimie, you can check out the below SHACL-based UML diagram:

Gimie SHACL Schema

Contributing

All contributions are welcome. New functions and classes should have associated tests and docstrings following the numpy style guide.

The code formatting standard we use is black, with --line-length=79 to follow PEP8 recommendations. We use pytest as our testing framework. This project uses pyproject.toml to define package information, requirements and tooling configuration.

For development:

Using Nix (recommended)

If you have Nix installed with flakes enabled, you can use the provided flake.nix to set up the development environment. This ensures all system dependencies (e.g. libstdc++ for numpy) are available:

git clone https://github.com/sdsc-ordes/gimie && cd gimie
nix develop

This drops you into a shell with Python 3.13, uv, and the required system libraries. From there:

uv sync
uv run pytest

To run a single command without entering the shell:

nix develop --command bash -c 'uv run gimie data https://github.com/numpy/numpy'

Without Nix

Requires Python 3.12+ and uv:

git clone https://github.com/sdsc-ordes/gimie && cd gimie
make install

run tests:

make test

run checks:

make check

For easier use of Github/Gitlab APIs, place your access tokens in the .env file (the .gitignore will ignore them when you push to GitHub):

cp .env.dist .env

build documentation:

make doc

Releases and Publishing on Pypi

Releases are done via github release

  • a release will trigger a github workflow to publish the package on Pypi
  • Make sure to update to a new version in pyproject.toml and conf.py before making the release
  • It is possible to test the publishing on Pypi.test by running a manual workflow: go to github actions and run the Workflow: 'Publish on Pypi Test'

Copyright

Copyright © 2024-2025 Swiss Data Science Center (SDSC),www.datascience.ch, ROR: ror.org/02hdt9m26. All rights reserved. The SDSC is a Swiss National Research Infrastructure, jointly established and legally represented by the École Polytechnique Fédérale de Lausanne (EPFL) and the Eidgenössische Technische Hochschule Zürich (ETH Zürich) as a société simple. This copyright encompasses all materials, software, documentation, and other content created and developed by the SDSC.

Release files for gimie 0.8.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 gimie 0.8.0
File Size Uploaded
gimie-0.8.0.tar.gz 197.3 kB Details

Built distribution (wheel)

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

Total release size: 311.7 kB

Release files / gimie-0.8.0.tar.gz

Download URL gimie-0.8.0.tar.gz
Size 197.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8130ca7fc118e85e1ed5ef75e4cc0805795a93e79edb66a6b65b4894916c3b5d
BLAKE2b-256 checksum
How to use checksums
2ff78a55095fb05a325b1874e3d818874fb113fa4e6fcc77c083041a61e36f7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 5, 2026.

Transparency log

Release files / gimie-0.8.0-py3-none-any.whl

Download URL gimie-0.8.0-py3-none-any.whl
Size 114.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
171ee2c1e2eb8fb9a1afa6180f6871fa0c43ccce05249b6c4efd92d7b1943993
BLAKE2b-256 checksum
How to use checksums
dff80eed47f527f20ca4c6ac0fa5b125383310175cf11cc7cea0593b0996cf5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 5, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

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