Pyramid settings module that lets you use settings.py
Project description
pyramid_settings
================
`pyramid_settings` is simplest package (2 functions to be fair) that enables
you to load python modules as pyramid settings files.
TL;DR; You can ditch most of your .ini files and store your settings in
clean python.
Usage
-----
from pyramid.config import Configurator
from pyramid_settings import load_settings
def main(global_config, **settings):
""" This function returns a Pyramid WSGI application.
"""
load_settings(__name__, settings, config=global_config)
config = Configurator(settings=settings)
config.scan()
return config.make_wsgi_app()
and this is all you need (if you use paster ini files and pserv) to be able to use:
$ pserv development.ini pysettings=settings.py,base.py,roman.py
Warning
-------
Everything you see here is work in progress and should not be ever used in
production (trust me - don't trust me). Contributions, critique, angry letters
and such are welcome.
Installation
------------
Install with pip::
$ pip install pyramid_settings
Issues and questions
--------------------
Have a bug? Please create an issue on GitHub!
https://github.com/niktto/pyramid_settings/issues
Contributing
------------
EasyEmail is an open source software and your contribution is very much
appreciated.
1. Check for
`open issues https://github.com/niktto/pyramid_settings/issues or
`open a fresh issue https://github.com/niktto/pyramid_settings/issues/new
to start a discussion around a feature idea or a bug.
2. Fork the
`repository on Github https://github.com/niktto/pyramid_settings
and make your changes.
3. Follow these rules: PEP8, PEP257 and The
Zen of Python.
4. Make sure to add yourself to AUTHORS and send a pull request.
Licence
-------
EasyEmail is available under the New BSD License. See
LICENSE https://github.com/niktto/pyramid_settings/blob/master/LICENSE
file.
================
`pyramid_settings` is simplest package (2 functions to be fair) that enables
you to load python modules as pyramid settings files.
TL;DR; You can ditch most of your .ini files and store your settings in
clean python.
Usage
-----
from pyramid.config import Configurator
from pyramid_settings import load_settings
def main(global_config, **settings):
""" This function returns a Pyramid WSGI application.
"""
load_settings(__name__, settings, config=global_config)
config = Configurator(settings=settings)
config.scan()
return config.make_wsgi_app()
and this is all you need (if you use paster ini files and pserv) to be able to use:
$ pserv development.ini pysettings=settings.py,base.py,roman.py
Warning
-------
Everything you see here is work in progress and should not be ever used in
production (trust me - don't trust me). Contributions, critique, angry letters
and such are welcome.
Installation
------------
Install with pip::
$ pip install pyramid_settings
Issues and questions
--------------------
Have a bug? Please create an issue on GitHub!
https://github.com/niktto/pyramid_settings/issues
Contributing
------------
EasyEmail is an open source software and your contribution is very much
appreciated.
1. Check for
`open issues https://github.com/niktto/pyramid_settings/issues or
`open a fresh issue https://github.com/niktto/pyramid_settings/issues/new
to start a discussion around a feature idea or a bug.
2. Fork the
`repository on Github https://github.com/niktto/pyramid_settings
and make your changes.
3. Follow these rules: PEP8, PEP257 and The
Zen of Python.
4. Make sure to add yourself to AUTHORS and send a pull request.
Licence
-------
EasyEmail is available under the New BSD License. See
LICENSE https://github.com/niktto/pyramid_settings/blob/master/LICENSE
file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pyramid_settings-0.1.2.tar.gz
.
File metadata
- Download URL: pyramid_settings-0.1.2.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02500aaa8158f0dd9d55271df956a8bc1112eaf2325f0c16bf7c05a1fe591896 |
|
MD5 | 692bc5ac99929ccdc795d02c42774a09 |
|
BLAKE2b-256 | 9d355ecf77965925aa8500c4715398650b3f01bfdbb4c2684d0eac2e1ed09524 |