A way to patch configuration files.
Project description
# amani
#About
Amani is a way to patch configuration files.
#Install
pip install amani
#Usage
constants.py
class A:
a = 1
b = []
c = [1, 3, 5]
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'maps',
'USER': 'root',
'PASSWORD': '',
'HOST': '',
'PORT': '3306',
}
}
try:
import amani
g = globals()
amani.patch(__file__, g)
except:
pass
patch_constants.py
PATCHES = [
["A", "a", 2],
["A", "b", ["test"]],
["A", "c", 1, 2**32],
["DATABASES", "default", "USER", "username"],
["DATABASES", "default", "PASSWORD", "pass-WORD"]
]
#About
Amani is a way to patch configuration files.
#Install
pip install amani
#Usage
constants.py
class A:
a = 1
b = []
c = [1, 3, 5]
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'maps',
'USER': 'root',
'PASSWORD': '',
'HOST': '',
'PORT': '3306',
}
}
try:
import amani
g = globals()
amani.patch(__file__, g)
except:
pass
patch_constants.py
PATCHES = [
["A", "a", 2],
["A", "b", ["test"]],
["A", "c", 1, 2**32],
["DATABASES", "default", "USER", "username"],
["DATABASES", "default", "PASSWORD", "pass-WORD"]
]
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
amani-0.0.2.tar.gz
(2.0 kB
view details)
File details
Details for the file amani-0.0.2.tar.gz
.
File metadata
- Download URL: amani-0.0.2.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63f1a6acf74dbbcb52212950f2abb2e353ce19987c093af2201f227661dc0e8e |
|
MD5 | 74fde7f45890ae2a5c78f94546892bff |
|
BLAKE2b-256 | 64d39129a0e13b34b0b698110a86671c9504e3e8aa7ebb148ada5205484a2837 |