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

This module offers an easy way to define named constants in Python, supporting some simple enum-like use case, as well as arbitrary value types like strings or floats.

Project description

This module offers an easy way to define named constants in Python, supporting some simple enum-like use case, as well as arbitrary value types like strings or floats. It is rather simple to use and does not have a big footprint, but supports the following features:

  • Ease of use (a simple class for scoping, plain definitions inside)
  • Enumeration of defined constants
  • Values know their name, i.e. you don’t have to guess which meaning the constant value 3 has (e.g. it’s name() will be ‘blue’ and its __repr__ will format as ‘Colors.blue’)
  • Arbitrary value types (not just integers)
  • Constant-ness (no change after time of definition)

Project details


Release history Release notifications

This version
History Node

1.0

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
named_constants-1.0.tar.gz (3.8 kB) Copy SHA256 hash SHA256 Source None Nov 21, 2014

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