Skip to main content

config selector

Project description

config selector

>>> import os
>>> SELFDIR = os.path.dirname(os.path.abspath('.'))  # or : SELFDIR = os.path.dirname(os.path.abspath(__file__))
>>> PROJECTDIR = os.path.dirname(SELFDIR)
>>> 
>>> from confselector import ConfSelector
>>> ConfSelector.configure([PROJECTDIR, os.path.join(PROJECTDIR, 'config'), os.path.join(PROJECTDIR, 'conf'), SELFDIR, ])
>>> 
>>> pyfile, configobj = ConfSelector.selected('-dev')
>>> print(pyfile, configobj)
>>> 
>>> pyfile, configobj = ConfSelector.selected('-prod')
>>> print(pyfile, configobj)
>>> 
>>> pyfile, configobj = ConfSelector.selected('')
>>> print(pyfile, configobj)
>>> 

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

confselector-1.0.1.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file confselector-1.0.1.tar.gz.

File metadata

  • Download URL: confselector-1.0.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/2.7.12

File hashes

Hashes for confselector-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6a082fd107a9aee151c40eaca1bd0761bfc19fd958ff2d5f55802efa2ddd9c2c
MD5 7d66386459b981631efd7ee181debc54
BLAKE2b-256 6758776465ebecf736791247f3fce4178991fdb8914ba82fef609edcb03813fe

See more details on using hashes here.

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