Skip to main content

Software Metadata for Humans

Project description

About - Metadata for Setuptools

Define the metadata of your project in a single place, then make it available in the setup and at runtime.

The standard pattern, for a simple module myproject, is to define an extra metadata module about_myproject:

# about_myproject.py
"""
My Project Summary

My Project Long Description
"""

metadata = dict(
    __appname__     = "myproject",
    __version__     = "1.0.0",
    __license__     = "MIT License",
    __author__      = u"Sébastien Boisgérault <Sebastien.Boisgerault@gmail.com>",
    __url__         = "https://warehouse.python.org/project/about",
    __doc__         = __doc__,
    __docformat__   = "markdown",
    __classifiers__ = ["Programming Language :: Python :: 2.7",
                       "Topic :: Software Development",
                       "License :: OSI Approved :: MIT License"]
  )

globals().update(metadata)
__all__ = metadata.keys()

Then, in myproject.py, you add a metadata section

# Metadata
from .about_myproject import *

and finally, in your setup.py file, use the following code:

import setuptools
import about
import .about_myproject

info = about.get_metadata(about_myproject)

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

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

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-4.0.0-alpha.3.tar.gz (21.3 kB view details)

Uploaded Source

File details

Details for the file about-4.0.0-alpha.3.tar.gz.

File metadata

  • Download URL: about-4.0.0-alpha.3.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for about-4.0.0-alpha.3.tar.gz
Algorithm Hash digest
SHA256 4919a7c31cc668e58ddb3d51ab1160f1db19accdc8771caa5d0f723c886a2e18
MD5 528d0656978a9568f88983d34c37fd12
BLAKE2b-256 2740ef5dfc10fdf2a7012aaf2f3cb1e9307ea22007b93843935095c7af48048b

See more details on using hashes here.

Supported by

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