Skip to main content

Load configs from python modules or Django applications.

Project description

Load configs from python modules especially Django applications. Plays well with Django application/modules. You can simply define your specification and then just load your modules which tells you what needs. It’s universal and easy to use.

Installation

pip install python-app-loader

Usage

Your settings.py

from app_loader import app_loader

APPS = ['testapp']

# load directly specified apps
app_loader.get_app_modules(APPS)

# load all modules
app_loader.load_modules()

# just propagate all loaded modules to settings
INSTALLED_APPS = app_loader.config.apps

# override all
try:
    from local_settings import *
except ImportError:
    pass

You can inicialize your AppLoader:

loader = AppLoader(autoload=False)

loader.get_app_modules(APPS)

print(loader.config.apps)

or you can create your own AppLoader:

class MyAppLoader(AppLoader):

    CONFIG_MASTER_OBJECT_CLASS = 'mymodule.MyMasterClass'

For advance example check django-leonardo which uses this module for loading configurations from all modules. (about 60+ modules) which could be auto loaded without any requirements.

Read More

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

python-app-loader-0.0.9.tar.gz (18.5 kB view details)

Uploaded Source

File details

Details for the file python-app-loader-0.0.9.tar.gz.

File metadata

File hashes

Hashes for python-app-loader-0.0.9.tar.gz
Algorithm Hash digest
SHA256 61c0d23feb0753d4623244859856b5fa45a0f32f1f0fc6c340906c25aeeecbc6
MD5 1b743aa9f69de667cb6359111fca98ce
BLAKE2b-256 9fe1e218002321e9254f324da3377add6884d32ac665015d2ec7912eeaffd449

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