hatch-codemetadata (0.1.0)

Published 2025-11-18 16:00:03 +00:00 by linarphy

Installation

pip install --index-url  hatch-codemetadata

About this package

Import metadata to pyproject.toml for hatchling's project

Hatch CodeMeta

CodeMeta schema is a standard metadata syntax to describe "Scientific software and code". This syntax depends of a codemetadata.json file in the root folder of your project, which act as a single source of trust.

Hatch is a python project manager which is also linked to a build system named Hatchling. This build system also manage the pyproject.toml file, that contains metadata information about the given project, authors, description and such.

These information are also specified in codemetadata.json file. This project allows to specify all such metadata only in codemetadata.json and fill pyproject.toml information dynamically from this file.

Getting Started

Include it as a plugin to your pyproject.toml

[build-system]
requires = ["hatchling", "codemetadata"]
build-backend = "hatchling.build"

Make the fields you want to import as dynamic

[project]
...
dynamic = ["version", "description", "authors"]

And then, make sure Hatchling uses it

[tool.hatch.metadata.hooks.codemetadata]

Documentation

The documentation is available as markdown files.

Requirements

Requires Python: >3.11
Details
PyPI
2025-11-18 16:00:03 +00:00
2
41 KiB
Assets (2)
Versions (1) View all
0.1.0 2025-11-18