Skip to main content

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.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 weni-commons 1.6.0
File Size Uploaded
weni_commons-1.6.0.tar.gz 116.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for weni-commons 1.6.0
File Interpreter ABI Platform
weni_commons-1.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 268.1 kB

Release files / weni_commons-1.6.0.tar.gz

Download URL weni_commons-1.6.0.tar.gz
Size 116.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b1ad780dee1410ee86284f98849484e86d82aeeb29ec1844698e79ef4cf382ca
BLAKE2b-256 checksum
How to use checksums
1d9134ac418164de490a044ebe2748b3aa7f983ba277133f1fd147dfd91b2fb4
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.0-py3-none-any.whl

Download URL weni_commons-1.6.0-py3-none-any.whl
Size 151.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7a10018107898c6dc556b0400da648372f821689d9e1ed7655d2bae623449e5e
BLAKE2b-256 checksum
How to use checksums
225a36729d4e5230bb648b617f092741f48911a91962cf3eae5e27544b75443d
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 history Release notifications | RSS feed

1.6.2

2 release files

1.6.1

2 release files

This release

1.6.0 This release

2 release files

1.5.2

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

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