Skip to main content

git-metainfo

Generate git metadata JSON

Output git metadata:

By default, author and committer names and emails are omitted:

$ git-metainfo
{
  "hash": "40b71138b4ef89496645e377008e11eedbe207d6",
  "short_hash": "40b7113",
  "author_date": "2026-05-08 22:06:47 -0700",
  "author_date_iso": "2026-05-08T22:06:47-07:00",
  "committer_date": "2026-05-08 22:06:47 -0700",
  "committer_date_iso": "2026-05-08T22:06:47-07:00",
  "message": "Code",
  "branch": "master",
  "detached_head": false
}

Include names and emails with --include-identity:

$ git-metainfo --include-identity
{
  "hash": "40b71138b4ef89496645e377008e11eedbe207d6",
  "short_hash": "40b7113",
  "author_name": "John Doe",
  "author_email": "john@doe.com",
  "author_date": "2026-05-08 22:06:47 -0700",
  "author_date_iso": "2026-05-08T22:06:47-07:00",
  "committer_name": "John Doe",
  "committer_email": "john@doe.com",
  "committer_date": "2026-05-08 22:06:47 -0700",
  "committer_date_iso": "2026-05-08T22:06:47-07:00",
  "message": "Code",
  "branch": "master",
  "detached_head": false
}

Output to a file:

git-metainfo --output file.json

Use as library:

from git_metainfo.core import get_git_data

data = get_git_data()

# Include author and committer names and emails
data = get_git_data(include_identity=True)

Development

Install

poetry install

Install pre-commit

pre-commit install

Format

ruff format && isort .

See also:

Typescript version

Metadata

Release files for git-metainfo-python 0.1.3

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

Source distribution (sdist)

Source distribution for git-metainfo-python 0.1.3
File Size Uploaded Provenance Actions
git_metainfo_python-0.1.3.tar.gz 2.9 kB Without provenance Details for git_metainfo_python-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for git-metainfo-python 0.1.3
File Interpreter ABI Platform Actions
git_metainfo_python-0.1.3-py3-none-any.whl Python 3 none any Details for git_metainfo_python-0.1.3-py3-none-any.whl

Total release size: 7.2 kB

Release files / git_metainfo_python-0.1.3.tar.gz

Download URL git_metainfo_python-0.1.3.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d4d308a5ce9078a0561bec106f90d46410026b921c39da7c23438d8d57aa2b93
BLAKE2b-256 checksum
How to use checksums
837c6e98f0db6664e87ea43d697e7004a6c706c25ddd7a1b448518f3da1fae62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.10.14 Darwin/25.5.0

Release files / git_metainfo_python-0.1.3-py3-none-any.whl

Download URL git_metainfo_python-0.1.3-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d60e312ae2236b8d6b5431dabfb99399e610676616230d2a9ad89487829be8f5
BLAKE2b-256 checksum
How to use checksums
87d1ca75a8ddccc447eb6e0ba65cca1c977df0c4c99e13c1222ad73e74119373
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.10.14 Darwin/25.5.0

Security for git-metainfo-python 0.1.3

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

0.1.3 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