Skip to main content

lapa_database

about

database layer for my personal server.

installation

pip install lapa_database[all]

usage (WIP)

change password in config.ini.

CREATE_SCHEMA = True to create database from scratch.

LOG_FILE_NAME and configure logger

config

lapa_database\data\config.ini

env

  • python>=3.12.0

changelog

v0.0.14

  • bug fix in config file support.

v0.0.13

  • https support.

v0.0.12

  • fix bug in reading log_file_name.

v0.0.11

  • add square_logger section in environment and initialise logger as per those variables.
  • keep logger and lapa_database_structure as >= instead of ~=.
  • update minimum version for lapa_commons.

v0.0.10

  • removed import for main file from config.
  • removed validation for table names in crud call in pydantic models.
  • adjust all crud calls to account for pydantic model change from enum to str.

v0.0.9

  • removed config.example.ini.
  • bug fix: create_database -> data insertion now takes schema into account.

v0.0.8

  • add module name in config.
  • add first test case.
  • add dependencies for testing.
  • add GitHub workflow for testing.
  • remove config from gitignore.

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!

Metadata

Release files for lapa-database 0.0.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lapa-database 0.0.14
File Size Uploaded Provenance Actions
lapa_database-0.0.14.tar.gz 12.0 kB Without provenance Details for lapa_database-0.0.14.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lapa-database 0.0.14
File Interpreter ABI Platform Actions
lapa_database-0.0.14-py3-none-any.whl Python 3 none any Details for lapa_database-0.0.14-py3-none-any.whl

Total release size: 25.8 kB

Release files / lapa_database-0.0.14.tar.gz

Download URL lapa_database-0.0.14.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7807810991091e9af75599e2d3cc9a04c693c8e0a640283538d42652f703c3b7
BLAKE2b-256 checksum
How to use checksums
d4d344279b1d4998ffbe559179e3a4a832d3c20d0b47379f12f63a5570836d54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Release files / lapa_database-0.0.14-py3-none-any.whl

Download URL lapa_database-0.0.14-py3-none-any.whl
Size 13.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
172e5f4233a7ad26e544c6d807fa7287cb95bab098a5bcf1e11a3922561cf844
BLAKE2b-256 checksum
How to use checksums
0c7a285e66c7fb61861c64c7856eb9533585e405cc01ff12480cab5f0b2bb25b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Security for lapa-database 0.0.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page