Weni Commons
A Python library that centralizes common functionality and utilities used across Weni's Django backend applications. This library promotes code reuse, consistency, and maintainability by providing shared components and utilities that can be easily integrated into multiple Django projects.
Installation
Using Poetry (Recommended for Weni projects)
poetry add weni-commons
Using pip
pip install weni-commons
Available Features
Feature Flags
Weni Feature Flags is a Python Library that functions as an abstraction layer between Django projects and GrowthBook.
from weni.feature_flags.services import FeatureFlagsService
# Use the feature flags service
feature_service = FeatureFlagsService()
You can access the complete instructions on how to use its features here.
Authentication and Permissions
Unified DRF authentication for App IO JWTs and Keycloak tokens. A single
WeniAuthentication class validates a Weni JWT first and falls back to Keycloak
(OIDC), exposing a WeniAuthContext on request.auth.
from weni_commons.auth import WeniAuthentication
See the full usage guide in weni_commons/auth/README.md.
Requirements
- Python >= 3.8
- Django >= 3.2.22
- Django REST Framework >= 3.12.0
- Celery >= 5.0.0
- Redis (via django-redis >= 4.0.0)
Contributing
This library is designed to grow with Weni's needs. If you have common utilities that could benefit multiple Django projects, consider contributing them to this library.
License
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Metadata
Release files for weni-commons 1.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| weni_commons-1.6.1.tar.gz | 118.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| weni_commons-1.6.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 271.5 kB
Release files / weni_commons-1.6.1.tar.gz
| Download URL | weni_commons-1.6.1.tar.gz |
|---|---|
| Size | 118.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
884a9e6fbd815902a7a1f9a6e0f0773a4d60c61572ea937be331bbe1a660c189
|
|
BLAKE2b-256 checksum How to use checksums |
2016cbc39a1c3d99353f5fcafc12d98daff04cebd3c535c68888a490c02963f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.8.18 Linux/6.17.0-1022-azure
|
Release files / weni_commons-1.6.1-py3-none-any.whl
| Download URL | weni_commons-1.6.1-py3-none-any.whl |
|---|---|
| Size | 153.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c85c01db896774c88ec767aa054982c3eb0cfec4adb99c049cda33bda1b19b3
|
|
BLAKE2b-256 checksum How to use checksums |
d4880060d10c26fdb11b06a8d35a9dd410e3719b1dcad15e2776a712fc592ba9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.8.18 Linux/6.17.0-1022-azure
|