Skip to main content

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"]
]

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

amani-0.0.2.tar.gz (2.0 kB view details)

Uploaded Source

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

Hashes for amani-0.0.2.tar.gz
Algorithm Hash digest
SHA256 63f1a6acf74dbbcb52212950f2abb2e353ce19987c093af2201f227661dc0e8e
MD5 74fde7f45890ae2a5c78f94546892bff
BLAKE2b-256 64d39129a0e13b34b0b698110a86671c9504e3e8aa7ebb148ada5205484a2837

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