Streamlit-sqlalchemy

Latest version: v0.2.4

Safety actively analyzes 700984 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.2.4

**fix: allow using None for foreign keys**


AttributeError: 'NoneType' object has no attribute 'id'


If it were to fail, it should be on the DB side, not in the library.

0.2.3

**fix: except_column failing with foreign keys**


Traceback (most recent call last):
File "/home/agossuin/.local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 600, in _run_script
exec(code, module.__dict__)
File "/home/agossuin/...", line 42, in my_class_view
MyClass.st_crud_tabs(
File "/home/agossuin/.local/lib/python3.10/site-packages/streamlit_sqlalchemy/mixin.py", line 288, in st_crud_tabs
cls.st_update_select_form(
File "/home/agossuin/.local/lib/python3.10/site-packages/streamlit_sqlalchemy/mixin.py", line 228, in st_update_select_form
if selected_obj_to_update.st_update_form(
File "/home/agossuin/.local/lib/python3.10/site-packages/streamlit_sqlalchemy/mixin.py", line 582, in st_update_form
kwargs[field] = kwargs[field].id
AttributeError: 'int' object has no attribute 'id'


+ small typehinting addition

0.2.2

**feat: return submitted state**

Because we did not have access to the submitted state, manual control
flow was complicated. For instance, creating an object from an
`st.experimental_dialog` was impossible.

This can still be improved, but for now it already makes things more
manageable.

in the future, st_update_select_form and st_delete_select_form as well
as st_crud_tabs should return a boolean with the submit status, but it
is not strictly necessary for now because they internally call st.rerun
anyway.

**feat: add streamlit tooltips from SQLObjects**

The `doc` arg can be passed to the `Column` objects, and will be displayed
as an helper tooltip on streamlit selectors.

more info on `doc`: https://docs.sqlalchemy.org/en/13/core/metadata.html#sqlalchemy.schema.Column.params.doc

0.2.0

fix!: Add the many2one in update form

Originally, the many2one were not added to the update form because of
my single usecase. However it absolutely makes sense to be able to
modify the many2one relationships.

To keep the original behiaviour, you can use the except_columns
kwarg and add each of the _id ending fields.

BREAKING CHANGE: Now you have the many2one by default in the update
form.

Refs: https://github.com/artygo8/streamlit-sqlalchemy/issues/3

0.1.1

What's Changed
* [FIX] Fixing issue 1 by artygo8 in https://github.com/artygo8/streamlit-sqlalchemy/pull/2

**Full Changelog**: https://github.com/artygo8/streamlit-sqlalchemy/compare/0.1.0...0.1.1

Thank you for opening 1 !

0.1.0

Main changes:
- Optional `filter_by: dict` kwarg for `*_select_form` to display only
the elements you are interested in. (ex: filter on foreign key)
- Optional `except_columns: list` for `_form` methods: column names to
exclude from the form.
- Ensure the default value from the Column declaration is set.

Meta elements:
- `__st_input_meta__`: specify custom streamlit components for your
columns.
- `__st_repr__`: specify how an SQLAlchemy object is displayed in a
`selectbox`.
- `__st_order_by__`: specify how SQLAlchemy objects are ordered in a
`selectbox`.

New column types supported:
- Float: similar to int but with 0.1 steps
- Datetime: 2 input elements - Date & Time
- Date: st.date_input
- Time: st.time_input
- Text: st.text_area

Details:
- Add KWO arg `border=False` to methods containing forms
(streamlit>=1.29.0)

Page 1 of 2

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.