Software Metadata for Humans
Project Links
Meta
Author: Sébastien Boisgérault
Classifiers
Operating System
- OS Independent
Programming Language
- Python :: 2
- Python :: 3
Topic
- Software Development
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
Aug 07, 2024
2.4
Apr 19, 2023
2.4b0
Nov 23, 2022
2.3
Apr 20, 2022
2.2
Feb 16, 2022
2.1
Dec 04, 2021
2.0.1
Apr 05, 2020
2.0a4
Apr 05, 2020
2.0a3
Mar 28, 2020
2.0a2
Mar 28, 2020
2.0a1
Jun 28, 2021
1.1.0
Oct 08, 2017
1.0.2
Oct 08, 2017
1.0.1
Oct 08, 2017
1.0.0
Oct 02, 2017
1.0.0b3
Mar 24, 2016
1.0.0b2
Mar 18, 2016
1.0.0b1
Mar 18, 2016
1.0.0a19
Mar 18, 2016
1.0.0a18
Mar 17, 2016
1.0.0a17
Mar 15, 2016
1.0.0a16
Feb 19, 2016
1.0.0a14
Feb 19, 2016
1.0.0a13
Feb 14, 2016
1.0.0a12
Feb 03, 2015
1.0.0a8
Feb 03, 2015
1.0.0a7
Feb 03, 2015
1.0.0a6
Sep 14, 2014
1.0.0a3
Mar 22, 2014
1.0.0a0
Files in release
No dependencies