Skip to main content

Add your description here

Project description

TSQL

A Python Environment Database Module Generator

Installation

to install using pip:
$ pip install tsql-yaboiteedoh

Usage

the bash command:
$ tsql

Runs the application in the current directory, allowing you to search it for valid configuration files or generate a new database where you are

To get the most out of that I have it installed into a toolbox .venv, and have added this function to my ~/.bashrc script:

sql() {
    (
        source '/home/teedoh/devkit/.venv/bin/activate'
        tsql
    )
}

Saving the configuration saves to the current directory under (database name).tsql Default behavior is to not override previous saves, to enable easier version control

Exporting the configuration folder dumps a python module named after the database into the current directory, which you can reach with

from {database name} import Database

once instantiated, you can reach into the database with the associated functions on the table objects

db = Database()
with db:
    table_entries = db.{table name}.read_all()

Functionality

0.1.9

  • support for datatypes
    • TEXT
    • INT
    • BOOL
  • Groups
    • search multiple columns for the same value
  • Filters
    • return based on a combination of column and group values
  • parameters
    • NOT NULL
    • PRIMARY KEY
    • AUTOINCREMENT
  • Column Types
    • functions with dataclass object returns for unique column values
    • functions with list of dataclass object returns for shared column values
    • any column not labeled 'returns' is considered passive
      • these will exist on the dataclass object but not have an associated query function
  • Column references
    • these will update dynamically as you alter your table config

0.1.10

  • export module alterations
    • to use the database object via context manager
    • to remove create tables on database object init
      • instead use
database.init_tables()

0.2.0

  • expanded data types and parameters
    • data types
      • TEXT
      • INTEGER
      • REAL
      • BLOB
    • parameters
      • PRIMARY KEY
      • AUTOINCREMENT
      • NOT NULL
      • CHECK
        • Saves expressions as entered
      • DEFAULT
        • Including support for
          • CURRENT_TIME
          • CURRENT_DATE
          • CURRENT_TIMESTAMP
      • COLLATE (on TEXT columns)
  • config validation
    • enforces unique table/column/filter/group names in their proper scopes
    • enforces non-empty groups and filters
    • More to come as cases emerge

0.3.0

  • Hidden columns which will not appear on the dataclass object
    • Table dataclasses no longer use dataclass module
    • reading and updating values on hidden classes require rowid to query

0.3.1

  • Dataclasses now have a config property which prints a simple dictionary
    • contains row ids for reference tables
    • setter allows for quick updating of all columns on the object
  • Dataclasses now have a view function which prints a complex dictionary
    • row id columns for reference tables are now dataclass.config dictionaries
    • this is recursive
  • Filesystem changes
    • streamlined the export filesystem
      • main module contains everything but the table class definitions
  • Module should now be able to find the included database no matter where it gets run from

0.4.0

  • Finalized Join functionality through the view(db) function standard on each dataclass object

0.5.0 (planned)

  • Built in version control system
  • data migration tools

1.0.0 (planned)

  • Interface overhaul

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

tsql_yaboiteedoh-0.4.0.tar.gz (50.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tsql_yaboiteedoh-0.4.0-py3-none-any.whl (62.0 kB view details)

Uploaded Python 3

File details

Details for the file tsql_yaboiteedoh-0.4.0.tar.gz.

File metadata

  • Download URL: tsql_yaboiteedoh-0.4.0.tar.gz
  • Upload date:
  • Size: 50.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for tsql_yaboiteedoh-0.4.0.tar.gz
Algorithm Hash digest
SHA256 a6544d722d25907e025112613bd90d7a577ea1d81038a3049f9420d34a87e9da
MD5 4bd6984432b21c53b5ce5de7fcb991b2
BLAKE2b-256 7728d2db2122d95481ae44a908ca7b9fcf8494b256c7a56cb56e02324f74a777

See more details on using hashes here.

File details

Details for the file tsql_yaboiteedoh-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: tsql_yaboiteedoh-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 62.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for tsql_yaboiteedoh-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ec4ab581854398ecb11a6cab7b70f4a0eadf6d5459c47431973c188987d4564c
MD5 d6d88b7664a904cf5eed2230bcb128d3
BLAKE2b-256 16ccf5f934adbc3b5ca336b40581de5c52a2ffefa0beb40aeb1d8900c9b0395a

See more details on using hashes here.

Supported by

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