Skip to main content

prefab-cloud-django

This project provides custom template tags for using prefab-cloud-python in Django applications

Usage

  1. Add this project to your Django application's dependencies
  2. Add prefab_cloud_django to the list of INSTALLED_APPS in your app's settings.py
  3. Configure your Prefab client in settings.py
options = prefab.Options(
    api_key="...",
    ...
    log_boundary=BASE_DIR,
)

PREFAB = prefab.Client(options)
LOGGER = PREFAB.logger
  1. In your templates, add {% load prefab_tags %}

  2. Use these tags

{% prefab_get "name-of-config" %}
{% prefab_enabled "name-of-flag" %}

# with default

{% prefab_get "name-of-config" default="default" %}

# with context

{% prefab_get "name-of-config" context=context %}

Metadata

Release files for prefab-cloud-django 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 prefab-cloud-django 0.2.0
File Size Uploaded
prefab_cloud_django-0.2.0.tar.gz 1.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for prefab-cloud-django 0.2.0
File Interpreter ABI Platform
prefab_cloud_django-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.0 kB

Release files / prefab_cloud_django-0.2.0.tar.gz

Download URL prefab_cloud_django-0.2.0.tar.gz
Size 1.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e9c73fff13294399b8dd8851562493dfa075772c64a207661a24d3090f9f7e15
BLAKE2b-256 checksum
How to use checksums
0f4de975a07aa408362cefedde2ba96f37782e0bc0d841007591e91898776fd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.7 Darwin/22.5.0

Release files / prefab_cloud_django-0.2.0-py3-none-any.whl

Download URL prefab_cloud_django-0.2.0-py3-none-any.whl
Size 2.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e299ad18782373a9e10a019707efc8db3f6c78870dcd1d8feb10cae2ef66bcf1
BLAKE2b-256 checksum
How to use checksums
02565295e6910677cebb17af70678252dd99bd37b2999b3fcef3e40351e05541
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.7 Darwin/22.5.0

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

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