33** A modular toolkit for building, configuring, and managing databases using SQLAlchemy**
44
55The SQLAlchemy Database Toolkit simplifies the setup and management across different relational databases.
6- Currently, it handles configuration loading, engine creation, ORM base registration, and session management.
6+ Currently, it handles configuration loading, engine creation, ORM base registration, session management and CRUD operations .
77It provides an extensible foundation for rapid database development, prototyping, and integration into data pipelines or applications.
88
99Supported DBMS under current version:
@@ -81,7 +81,7 @@ Engine Factory Example:
8181``` python
8282from sqlalchemy_dbtoolkit.engine.factory import AlchemyEngineFactory
8383
84- engine = AlchemyEngineFactory(dbms = " mysql" , db_name = " analytics_db" , config_path = ' ../.config/config.ini' ).engine
84+ engine = AlchemyEngineFactory(dbms = ' mysql' , db_name = ' analytics_db' , config_path = ' ../.config/config.ini' ).engine
8585```
8686
8787ORM Table Management Example:
@@ -106,14 +106,29 @@ ORM Session Insert Example:
106106from sqlalchemy_dbtoolkit.query.create import InsertManager
107107
108108inserter = InsertManager(engine)
109- inserter.add_row(YourTable, {" column_1" : " value" , " column_2" : 42 })
109+ inserter.add_row(YourTable, {' column_1' : ' value' , ' column_2' : 42 })
110110```
111111
112112ORM Session Select Example:
113113``` python
114114from sqlalchemy_dbtoolkit.query.read import SelectManager
115115selector = SelectManager(engine)
116- selection = selector.select_one_by_column(Table = YourTable, column_name = " column_1" , value = " value" )
116+ selection = selector.select_one_by_column(Table = YourTable, column_name = ' column_1' , column_value = ' value' , operator_name = ' eq' )
117+ ```
118+
119+ ORM Session Update Example:
120+ ``` python
121+ from sqlalchemy_dbtoolkit.query.update import UpdateManager
122+ updater = UpdateManager(engine)
123+ updates = {' column_2' : 43 }
124+ updated_rows = updater.update_rows(Table = YourTable, column_name = ' column_1' , column_value = ' value' , update_dict = updates, operator_name = ' eq' )
125+ ```
126+
127+ ORM Session Delete Example:
128+ ``` python
129+ from sqlalchemy_dbtoolkit.query.delete import DeleteManager
130+ deleter = DeleteManager(engine)
131+ deleted_rows = deleter.delete_rows_by_filter(Table = YourTable, column_name = ' column_1' , column_value = ' value' , operator_name = ' eq' )
117132```
118133
119134Inspector Example:
@@ -129,7 +144,7 @@ for table in table_names:
129144## Roadmap
130145
131146- [ ] Pandas Integration: Enable conversion between database queries and pandas DataFrames for analysis and data manipulation
132- - [ ] Full CRUD Support: Expand the query layer to include read, update, and delete operations
147+ - [X ] Full CRUD Support: Expand the query layer to include read, update, and delete operations
133148- [ ] SQLAlchemy Core Support: Provide additional utilities to support low-level, fine-grained database interactions
134149- [ ] Integrated Logging: Add structured logging across all components to improve debugging
135150- [ ] Integrate DBMSs: Include support for additional DBMS like mariadb, mssql and oracle
0 commit comments