semvec/pypi-packages huggingface dataset:
jwtbased-rbac 1.0.0
Role-Based Access Control system with PostgreSQL backend and JWT authentication
License: MIT
Requires Python: >=3.9

# JWT-Based RBAC

Role-Based Access Control system with PostgreSQL backend and JWT authentication.

## Features

- 🔐 **Database-backed permissions** - PostgreSQL storage for roles and permissions
- 🎫 **JWT token management** - Create and validate JWT tokens with embedded permissions
- ⚡ **Permission caching** - In-memory caching with configurable TTL
- 📝 **Audit logging** - Track all authorization attempts
- 🔄 **Role management** - Assign/revoke roles dynamically

## Installation
```bash
pip install jwtbased-rbac
```

## Quick Start
```python
import asyncpg
from jwtbased_rbac import init_rbac_manager, get_rbac_manager, JWTManager

# Initialize with database pool
pool = await asyncpg.create_pool('postgresql://...')
init_rbac_manager(pool)

# Get manager instance
rbac = get_rbac_manager()

# Check user permission
allowed = await rbac.check_permission('user@example.com', 'admin_tool')

# Get user's permissions
permissions = await rbac.get_user_permissions('user@example.com')

# Create JWT token
token = JWTManager.create_access_token('user@example.com', permissions)

# Decode token
payload = JWTManager.decode_token(token)
```

## Environment Variables
```bash
# Required
JWT_SECRET_KEY=your_secret_key_here  # Generate with: python -c 'import secrets; print(secrets.token_urlsafe(32))'

# Optional
RBAC_CACHE_TTL_SECONDS=300           # Cache TTL (default: 300)
RBAC_STRICT_MODE=true                # Deny on errors (default: true)
RBAC_AUDIT_ENABLED=true              # Enable audit log (default: true)
JWT_ALGORITHM=HS256                  # JWT algorithm (default: HS256)
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=30  # Token expiry (default: 30)
```

## License

MIT License
cap-composer 1.2.1
Wagtail based weather warnings composing and dissemination tool, using Common Alerting Protocol (CAP) standard.
License: MIT
Requires Python: >=3.8

A [Wagtail](https://wagtail.io/)
based [Common Alerting Protocol](https://docs.oasis-open.org/emergency/cap/v1.2/CAP-v1.2-os.html) (CAP) Warning
Composer.

This is a web-based tool for creating and managing CAP alerts. It is designed to be used by National Meteorological and
Hydrological Services (NMHSs), disaster management agencies and other organizations that have the authority to publish
and disseminate CAP alerts.

For more details, see [https://github.com/wmo-raf/cap-composer](https://github.com/wmo-raf/capcomposer)