Skip to main content

Generate CodeMeta metadata for Python packages

Project description

The goal of CodeMetaPy is to generate the JSON-LD file, codemeta.json containing software metadata describing a Python package. For more general information about the CodeMeta Project for defining software metadata, see In particular, new users might want to start with the User Guide, while those looking to learn more about JSON-LD and consuming existing codemeta files should see the Developer Guide.


pip install codemetapy


Query and convert any package installed through pip:

$ pip show -v somepackage | codemetapy

To pipe to an output file:

$ pip show -v somepackage | codemetapy > codemeta.json

The tool also supports adding properties through parameters:

$ pip show -v somepackage | codemetapy --developmentStatus active > codemeta.json

To read an existing codemeta.json and extend it:

$ pip show -v somepackage | codemetapy -i json,pip codemeta.json - > codemeta.json

Here - represents standard input and -i denotes the input types, you can chain as many as you want.

This tool can also deal with debian packages (albeit limited):

$ apt show somepackage | codemetapy -i apt

Entrypoint Extension

Though this is not part of the codemeta specification, the tool currently supports an extra entryPoints property with type EntryPoint. This can be used to describe the entry points specified in a python package (entry points will have use a file:// url to refer to the actual entrypoints, this is a bit of a liberal use…). Because this is a non-standard extension it has to be explicitly enabled using --with-entrypoints.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
CodeMetaPy-0.2.1.tar.gz (32.6 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page