Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ pytest-timeout>=2.2.0 # Test timeout protection
# Optional storage backends
# Uncomment as needed:

# PostgreSQL
# sqlalchemy>=2.0.0
# SQLite / PostgreSQL / MySQL (SQLAlchemy adapter)
sqlalchemy>=2.0.0

# PostgreSQL driver
# psycopg2-binary>=2.9.0

# MySQL
# sqlalchemy>=2.0.0
# MySQL driver
# pymysql>=1.0.0

# Redis (caching)
Expand Down
12 changes: 11 additions & 1 deletion src/rbac/storage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@

This module contains storage provider implementations that follow the
IStorageProvider protocol defined in core.protocols.

Available backends:
- :class:`MemoryStorage` – in-process dict storage (dev/test)
- :class:`SQLAlchemyStorage` – SQL-backed storage (SQLite, PostgreSQL, MySQL)
"""

from .base import BaseStorage
from .memory import MemoryStorage

__all__ = ['BaseStorage', 'MemoryStorage']
try:
from .sqlalchemy_adapter import SQLAlchemyStorage
_SQLALCHEMY_AVAILABLE = True
except ImportError:
_SQLALCHEMY_AVAILABLE = False

__all__ = ['BaseStorage', 'MemoryStorage', 'SQLAlchemyStorage']
Loading
Loading