Django library with Legal Consent compliance utilities and reusable apps
Project description
WeFa Django Toolkit
WeFa (Web Factory) delivers a set of modular Django apps that cover recurring web platform concerns such as authentication bootstrapping and legal consent management. The toolkit focuses on convention-over-configuration so new projects can enable production-grade defaults with minimal setup.
Table of Contents
- Features
- Installation
- Included Apps
- Quick Start
- Configuration
- Requirements
- Local Development
- Contributing
- License
- Project Status
Features
- Shared utilities that power the higher-level apps (
nside_wefa.common) - Plug-and-play Django REST Framework authentication configuration (token and JWT) (
nside_wefa.authentication) - Legal consent tracking with automatic user onboarding and templated documents (
nside_wefa.legal_consent) - System checks and sensible defaults so configuration mistakes surface early
Installation
Install the package from PyPI:
pip install nside-wefa
Or add it to your dependency file (e.g. requirements.txt):
nside-wefa>=0.3.0
Included Apps
Common
Foundational helpers shared across the toolkit. You rarely interact with it directly, but it must be installed before the other apps.
Authentication
Automatically wires Django REST Framework authentication classes, URLs, and dependency checks. See nside_wefa/authentication/README.md for the full guide.
Legal Consent
Tracks acceptance of privacy and terms documents with templating support and REST endpoints. See nside_wefa/legal_consent/README.md for details.
Quick Start
-
Install the package.
-
Add the apps to
INSTALLED_APPS(order matters):INSTALLED_APPS = [ # Django + DRF dependencies... "rest_framework", "rest_framework.authtoken", # For token auth "rest_framework_simplejwt", # For JWT auth "nside_wefa.common", "nside_wefa.authentication", "nside_wefa.legal_consent", ]
-
Apply migrations:
python manage.py migrate
-
Expose the URLs you need:
from django.urls import include, path urlpatterns = [ # ...your URLs path("auth/", include("nside_wefa.authentication.urls")), path("legal-consent/", include("nside_wefa.legal_consent.urls")), ]
Configuration
The toolkit reads from a namespaced settings dictionary. Start with the minimal configuration below and extend it as needed:
# settings.py
NSIDE_WEFA = {
"APP_NAME": "My Product", # Used in legal consent templates
"AUTHENTICATION": {
"TYPES": ["TOKEN", "JWT"], # Enable the authentication flows you need
},
"LEGAL_CONSENT": {
"VERSION": 1,
"EXPIRY_LIMIT": 365, # days
# "TEMPLATES": BASE_DIR / "templates/legal_consent", # Optional overrides
},
}
Validation happens through Django system checks. Run python manage.py check to surface configuration issues early.
Requirements
- Python >= 3.12
- Django >= 6.0.4
- Django REST Framework >= 3.14.0
- djangorestframework-simplejwt >= 5.5.1 (if you enable JWT support)
Local Development
Clone the repository and install the development extras:
cd django
python -m venv .venv
source .venv/bin/activate
pip install -e .[dev]
Run the demo project:
python manage.py migrate
python manage.py runserver
Execute the test suite and linters:
pytest
Contributing
We welcome feature ideas, bug reports, and pull requests. Check CONTRIBUTE for the current workflow (it will be merged with the repo-wide guidelines soon). Please include documentation updates and tests when relevant.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nside_wefa-0.6.0.tar.gz.
File metadata
- Download URL: nside_wefa-0.6.0.tar.gz
- Upload date:
- Size: 95.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24d21adf8984bb90d089ff7a9c3c590c71608516f6a2e6b71fecde39d3b59bbe
|
|
| MD5 |
b720d100b7e56624671756348311d9d2
|
|
| BLAKE2b-256 |
f4267645662bfb17884cd734b55f9f4f4499be18afae02b66ac1e3995288d3c8
|
Provenance
The following attestation bundles were made for nside_wefa-0.6.0.tar.gz:
Publisher:
release.yml on n-side-dev/wefa
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nside_wefa-0.6.0.tar.gz -
Subject digest:
24d21adf8984bb90d089ff7a9c3c590c71608516f6a2e6b71fecde39d3b59bbe - Sigstore transparency entry: 1363089268
- Sigstore integration time:
-
Permalink:
n-side-dev/wefa@46646a2f7bbe0f5d5c3233b9d5bbbe3cef45cab8 -
Branch / Tag:
refs/tags/0.6.0 - Owner: https://github.com/n-side-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@46646a2f7bbe0f5d5c3233b9d5bbbe3cef45cab8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file nside_wefa-0.6.0-py3-none-any.whl.
File metadata
- Download URL: nside_wefa-0.6.0-py3-none-any.whl
- Upload date:
- Size: 54.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3bf14e3ccf0c357e2c57a804d0ac90aeb9b98800a055a98483ee4ffe9ffaf4b
|
|
| MD5 |
40498446966731b742ec05ac64e9799b
|
|
| BLAKE2b-256 |
6a2d09fdd7a0bdc3433b4c7f575c6da98bdba91df28474d85fdf5fef4bc940e8
|
Provenance
The following attestation bundles were made for nside_wefa-0.6.0-py3-none-any.whl:
Publisher:
release.yml on n-side-dev/wefa
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nside_wefa-0.6.0-py3-none-any.whl -
Subject digest:
f3bf14e3ccf0c357e2c57a804d0ac90aeb9b98800a055a98483ee4ffe9ffaf4b - Sigstore transparency entry: 1363089347
- Sigstore integration time:
-
Permalink:
n-side-dev/wefa@46646a2f7bbe0f5d5c3233b9d5bbbe3cef45cab8 -
Branch / Tag:
refs/tags/0.6.0 - Owner: https://github.com/n-side-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@46646a2f7bbe0f5d5c3233b9d5bbbe3cef45cab8 -
Trigger Event:
release
-
Statement type: