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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

weni_commons-1.5.0.tar.gz (56.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

weni_commons-1.5.0-py3-none-any.whl (71.5 kB view details)

Uploaded Python 3

File details

Details for the file weni_commons-1.5.0.tar.gz.

File metadata

  • Download URL: weni_commons-1.5.0.tar.gz
  • Upload date:
  • Size: 56.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.8.18 Linux/6.17.0-1022-azure

File hashes

Hashes for weni_commons-1.5.0.tar.gz
Algorithm Hash digest
SHA256 aaf63a403bbc4f82023983eba463dd6369abcc6a391255073f34e06dcb0f7c4d
MD5 1611a7bdc6212098dd74d8f0b933640f
BLAKE2b-256 b76166e167b0da9f7723df9bf736fe4bb4b27113ba47bab165e5653df1065cca

See more details on using hashes here.

File details

Details for the file weni_commons-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: weni_commons-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 71.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.8.18 Linux/6.17.0-1022-azure

File hashes

Hashes for weni_commons-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2fbf89fe409d00d1e78ab780145a4d3f2d9a67d0d89c16f3f842224048196488
MD5 be76f14d0b33d8f72b13f2f74d695d13
BLAKE2b-256 1d05ff3469f44d8a03d71d01296ea826f631ec5cafae6a82b00587f9c16bd043

See more details on using hashes here.

Release history Release notifications | RSS feed

1.5.2

2 files

This release

1.5.0 This release

2 files

1.4.1

2 files

1.3.2

2 files

1.3.1

2 files

1.2.0

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 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