Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

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 about.py that contains the metadata of the project:

about
|--- setup.py
|--- README.md
|...
|--- about
|    |--- __init__.py
|    |...
|    |--- about.py

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 <Sebastien.Boisgerault@gmail.com>",
  __url__         = "https://warehouse.python.org/project/about",
  __summary__     = "Software Metadata for Humans",
  __keywords__    = "Python / 2.7, OS independent, software development"
)

globals().update(metadata)

__all__ = metadata.keys()

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

import about
import about.about

info = about.get_metadata(about.about)

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

if __name__ == "__main__":
    setuptools.setup(**info)

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

from .about import *

they become available in the top-level module:

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

Project details


Release history Release notifications

This version
History Node

5.2

History Node

5.1.1

History Node

5.1

History Node

5.0.1

History Node

5.0.0

History Node

5.0.0a1

History Node

4.0.0

History Node

4.0.0-beta

History Node

4.0.0-alpha.6

History Node

4.0.0-alpha.5

History Node

4.0.0-alpha.4

History Node

4.0.0-alpha.3

History Node

4.0.0-alpha.2

History Node

4.0.0-alpha

History Node

3.0.0-alpha.4

History Node

2.2.1

History Node

2.2.0

History Node

2.1.0

History Node

2.0.0

History Node

0.3.0

History Node

0.2.1

History Node

0.2.0

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2-alpha.1

History Node

0.1.1-alpha.1

History Node

0.1.0-alpha.1

History Node

0.0.1-alpha.2

History Node

0.0.1-alpha.1

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
about-5.2.tar.gz (9.7 kB) Copy SHA256 hash SHA256 Source None Mar 24, 2016

Supported by

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