Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SQL state session backend. #597

Merged
merged 5 commits into from
Jul 12, 2024
Merged

Conversation

richard-to
Copy link
Collaborator

This state session backend uses SQL Alchemy to support different SQL databases.

I tested using SQlite3 and PostgreSQL. Both seemed to work fine.

One slight workflow issue is that for non-SQLite3 databases, people will need to manually run a script to create the database table used for storing state sessions. The commands are mentioned in the config.md file. That's not the most user friendly approach. So probably need a better way to approach it. But I think for the initial version of this backend, it should be OK, especially considering we don't know how many people will actually use it.

Ref: #556

This state session backend uses SQL Alchemy to support different SQL
databases.

I tested using SQlite3 and PostgreSQL. Both seemed to work fine.

One slight workflow issue is that for non-SQLite3 databases, people
will need to manually run a script to create the database table used
for storing state sessions. The commands are mentioned in the config.md
file. That's not the most user friendly approach. So probably need a
better way to approach it. But I think for the initial version of this
backend, it should be OK, especially considering we don't know how many
people will actually use it.
mesop/server/state_session.py Show resolved Hide resolved
build_defs/requirements.txt Outdated Show resolved Hide resolved
docs/api/config.md Outdated Show resolved Hide resolved
docs/api/config.md Outdated Show resolved Hide resolved
mesop/server/config.py Outdated Show resolved Hide resolved
mesop/server/config.py Show resolved Hide resolved
mesop/server/state_session.py Outdated Show resolved Hide resolved
mesop/server/state_session_test.py Outdated Show resolved Hide resolved
mesop/server/state_session.py Show resolved Hide resolved
@richard-to richard-to merged commit 930fc71 into google:main Jul 12, 2024
3 checks passed
@richard-to richard-to deleted the sql-backend branch July 13, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants