Skip to main content

Shared subscription, payment, and multi-tenancy models for TalentGate ecosystem

Project description

TalentGate Base

The core shared package for the TalentGate multi-tenant SaaS ecosystem. This package provides abstract models, services, and security utilities to maintain consistency across all TalentGate-integrated applications (like HRMS, BMS, etc.).

Features

  • Multi-Tenancy: Base abstract models for Organizations and Subscriptions.
  • Payment Integration: Standardized wrappers for Paystack and Bank Transfer workflows.
  • Inter-System Communication: Secure HMAC-based communication utilities for service-to-service calls.
  • Feature Gating: Middleware to enforce subscription status across your application.

Installation

Install via pip:

pip install talent-gate-base

Setup & Configuration

1. Add to Django Settings

Add the package to your INSTALLED_APPS and specify your organization model:

INSTALLED_APPS = [
    ...
    "talent_gate_base",
]

# Required for the multi-tenant models
ORGANIZATION_MODEL = "your_app.Organization"

2. Implement Concrete Models

This package provides Abstract models. You must inherit from them in your local app:

from talent_gate_base.models.organization import AbstractOrganization
from talent_gate_base.models.subscription import AbstractSubscription

class Organization(AbstractOrganization):
    # Add your system-specific organization fields here
    pass

class Subscription(AbstractSubscription):
    # Add your system-specific subscription logic here
    pass

3. Inter-System Security

To communicate securely between TalentGate and your app, use the SystemCommunicator:

from talent_gate_base.services.system_comm import SystemCommunicator

# Verifying an incoming request from TalentGate
is_valid, error = SystemCommunicator.verify_django_request(
    request, 
    expected_api_key=settings.TG_API_KEY,
    expected_api_secret=settings.TG_SECRET_KEY
)

License

Proprietary. © AFEX Innovation Lab.

Project details


Download files

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

Source Distribution

talent_gate_base-0.3.12.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

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

talent_gate_base-0.3.12-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file talent_gate_base-0.3.12.tar.gz.

File metadata

  • Download URL: talent_gate_base-0.3.12.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for talent_gate_base-0.3.12.tar.gz
Algorithm Hash digest
SHA256 610ccb2cec9a395a9cebb46c8f1293e2cf0e82472fdac379e71c02b3bdd1d0ba
MD5 a84c8b0a841ab691b7d8da308419a2d8
BLAKE2b-256 aec9d4008640613c595d96779f0a881dff2778419142be221c9d8d84a73baf92

See more details on using hashes here.

File details

Details for the file talent_gate_base-0.3.12-py3-none-any.whl.

File metadata

File hashes

Hashes for talent_gate_base-0.3.12-py3-none-any.whl
Algorithm Hash digest
SHA256 2700f350f409ccf54f4c604428eb947e0432be83f18369dd8dc9e02c5270c0b3
MD5 5d7df3c6522c42ec27172022966d36b6
BLAKE2b-256 4439e2525be9ddee94fee0f8a0c15eeee3ae6b14192c0c9c2d4eccedd54f9b66

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page