Skip to main content

Software Metadata for Humans

Project description

Summary: define the metadata of your project in a single place, then make it available at setup-time and at runtime.

Let’s consider the about package as an example ; we add to our project files, in the source tree, a file named that contains the metadata of the project:

|--- about
|    |---
|    |...
|    |---

This file contains the metadata (and a little boilerplate):

# coding: utf-8

metadata = dict(
  __name__        = "about",
  __version__     = "5.1.1",
  __license__     = "MIT License",
  __author__      = u"Sébastien Boisgérault <>",
  __url__         = "",
  __summary__     = "Software Metadata for Humans",
  __keywords__    = "Python / 2.7, OS independent, software development"


__all__ = metadata.keys()

Setup. To use this metadata, the file includes the code:

import about
import about.about

info = about.get_metadata(about.about)

# add extra information (contents, requirements, etc.).

if __name__ == "__main__":

Runtime. The metadata is stored as a collection of attributes of the about.about module. If we include in the about/ file the one-liner

from .about import *

they become available in the top-level module:

>>> import about
>>> print about.__name__
>>> print about.__version__
>>> print about.__license__
MIT License

Project details

Download files

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

Source Distribution

about-5.2.tar.gz (9.7 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page