database layer for my personal server.
Project description
lapa_database
about
database layer for my personal server.
installation
pip install lapa_database[all]
usage (WIP)
config.example.ini to config.ini.
CREATE_SCHEMA = True to create database from scratch.
LOG_FILE_NAME and configure logger
link to lapa_database_structure
configs
- lapa_database\data\config.ini (can be created using lapa_database\data\config.example.ini)
- lapa_logger\data\config.ini
env
- python>=3.12.0
changelog
v0.0.5
- make crud logic default to no rows when filters are empty.
- add new parameters to make it easy to select all rows for edit, delete and get.
- move logger to configuration.py to fix bug of multiple logs being created.
v0.0.4
- rename to lapa database.
- fix bug in create_database that occurred in default data insertion.
- add logs to gitignore.
- change psycopg2 to psycopg2-binary in setup.py.
v0.0.3
- created utils folder containing CommonOperations.py under which the common functions used across modules are stored.
- web_socket implemented for retrieving the data from the table when a new row is added/deleted/updated.
- it takes database_name, table_name and schema_name as input through query params.
- input for websocket
- /ws/<database_name>/<table_name>/<schema_name>
- E.g. /ws/game/player/public
- /ws/<database_name>/<table_name>/<schema_name>
- initially returns all the rows and if any update is made it returns the updated data.
- trigger creation is implemented once the websocket connection is made. it will first check if the trigger function already exists or not and then only create.
v0.0.2
- remove databases folder and enums related to tables and put in separate module for better version control.
- add proper error message display on errors in configuration.py.
- known bugs:
- creating engines everytime on fastapi route call is creating idle sessions.
v0.0.1
- initial implementation.
- known bugs:
- creating engines everytime on fastapi route call is creating idle sessions.
Feedback is appreciated. Thank you!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lapa_database-0.0.5.tar.gz
(10.8 kB
view details)
Built Distribution
File details
Details for the file lapa_database-0.0.5.tar.gz
.
File metadata
- Download URL: lapa_database-0.0.5.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a7e96b759933e880cb8a6ced361c3541234bf97f9c888564c98e82eef45cc1d |
|
MD5 | 88bf63de653a2351d77a67b327798163 |
|
BLAKE2b-256 | 6ec584c2167bdc371562d77a8e451643a8031889d8d4ef5b2c16793912d1bf2f |
File details
Details for the file lapa_database-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: lapa_database-0.0.5-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e725ec3aa2335d052b33fc0f276df1bd4d273f75c0b357390ef5ff7acf898302 |
|
MD5 | c51e24d8ba5889a207048c94e006d58f |
|
BLAKE2b-256 | 4009db6f169b8f78af0b758047eabd9975056274957639eaea2716d7bcd1dc0b |