Skip to main content

Django Boot Core - Starter

PyPI - Version GitHub Workflow Status (with event) GitHub issues Static Badge

Core starter library for Django Boot.

This library will initialize Rhazes ApplicationContext by default and registers some beans on it.

Usage

First, add Django Boot Starter to INSTALLED_APPS:

INSTALLED_APPS = [
    ...,
    "django_boot_core",
]

Then assure you have these two settings in your settings.py:

DJANGO_BOOT = {
    "DI_PACKAGES": [],  # packages containing beans which you want to be scanned in your project
    "DI_SCAN_STARTERS": False,
    "APPLICATION_CONFIGURATION": {
        ... # Configuration for ApplicationConfiguration. Read below
    }
}

Application Configuration Parser

Main benefit of using this library is that you will have ApplicationConfiguration bean registered for you.

This bean allows you to use configuration files for different services (beans) in your project easily.

django_boot_core.services.ApplicationConfiguration is an autoconfigured extension on top of parse_it library.

To configure ApplicationConfiguration (and ParseIt class) try changing these values in the settings.

# settings.py

DJANGO_BOOT = {
    "APPLICATION_CONFIGURATION": {
        # Read what blow items do in `parse_it` documentation.
        "LOCATION": os.path.join(BASE_DIR, "application_config"), # Optional, Location to read configuration files from
        "CONFIG_TYPE_PRIORITY": ..., # optional
        "GLOBAL_DEFAULT_VALUE": ..., # optional
        "TYPE_ESTIMATE": ..., # optional
        "RECURSE": ..., # optional
        "FORCE_ENVVARS_UPPERCASE": ..., # optional
        "ENVVAR_PREFIX": ..., # optional
        "SUFFIX_MAPPING": ..., # optional
        "ENVVAR_DIVIDER": ..., # optional
        "NONE_VALUES": ..., # optional
    }
}

Default configuration location (directory) (in case BASE_DIR is set in settings.py) would be {BASE_DIR}/application_config.

Write your own starter apps

You can make Django Boot scan your apps by default without having to add anything specific in settings DI_PACKAGES by ending your app names in _starter.

To enable this feature you need to specify DJANGO_BOOT["DI_SCAN_STARTERS"] = True in settings.

DJANGO_BOOT = {
    "DI_SCAN_STARTERS": True,
    # other configurations here
}

Example: you have an app called polls and it requires some beans to be registered into ApplicationContext. You can rename the app to polls_starter instead and this library will automatically pick it to scan.

Alternatively (perhaps for performance reasons as well) you can skip this and just let other developers know that which packages then need to add to settings DI_PACKAGES after they install your app.

Metadata

Release files for django-boot-core-starter 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-boot-core-starter 0.2.0
File Size Uploaded Provenance Actions
django-boot-core-starter-0.2.0.tar.gz 5.0 kB Without provenance Details for django-boot-core-starter-0.2.0.tar.gz

Release files / django-boot-core-starter-0.2.0.tar.gz

Download URL django-boot-core-starter-0.2.0.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
228bea8e56e71910cfaca600ed68ef6868254cf8a94c41c3d6c786ec3206c149
BLAKE2b-256 checksum
How to use checksums
20e3dd97bc959d5b859dc73099f562b082e285a6320ea53f6efe4d7fc344d944
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Security for django-boot-core-starter 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page