obervinov / users-package

This Python module is designed to simplify user management in Telegram bots, providing the necessary functionality for tasks such as user authentication, authorization and compliance with speed limits, ensuring effective management of user attributes and access rights.
MIT License
1 stars 0 forks source link

Feature request: Add an additional backend - `Postgres` to store historical user data #41

Open obervinov opened 2 months ago

obervinov commented 2 months ago

Is your feature request related to a problem? Please describe. Add an additional PostgreSQL backend to store historical user data (in addition to Vault).

Describe the solution you'd like All user configuration should still be stored in the Vault. Postgres will serve as a repository of historical data. Adding the functionality of this backend will be minor and should require explicit inclusion when initializing the Users() class. Postgresql should store:

Describe alternatives you've considered None

Additional context Adding postgresql, in the future will help to greatly expand and simplify the work.

obervinov commented 2 weeks ago

Structure of table users_requests user_id -> str message_id -> str chat_id -> str authentication -> str authorization -> str timestamp -> datetime rate_limits -> datetime

Structure of table users user_id -> str chat_id -> str status -> str