Skip to main content

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

  1. lapa_database\data\config.ini (can be created using lapa_database\data\config.example.ini)
  2. lapa_logger\data\config.ini

env

  • python>=3.12.0

changelog

v0.0.7

  • use lapa_commons to read config.

v0.0.6

  • change default value of ignore_filters_and_get_all to False.

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
    • 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


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.7.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

lapa_database-0.0.7-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file lapa_database-0.0.7.tar.gz.

File metadata

  • Download URL: lapa_database-0.0.7.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for lapa_database-0.0.7.tar.gz
Algorithm Hash digest
SHA256 f2756f0e34e739f467b26bca1393f8a0147e7f49a9b85365354a454faea5f70c
MD5 b04c24bff2db7959807229736be6ad21
BLAKE2b-256 0222f5f59ff747dba70c5d5ac9dec49cdb5ad7b698310e8fd256613c2cd7724d

See more details on using hashes here.

File details

Details for the file lapa_database-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for lapa_database-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b87e32851397572e4c60cd809557bdb43d83e3164f73d15763356b05f6f55aa9
MD5 9d0054701957c5832597f52dc49113c6
BLAKE2b-256 9320d9fa4c48cbb2a656e5ee420c6876786d578ce784cc6aab50b34bfc7174af

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page