Skip to main content

YamlBase: simple yaml config based VCS for database

Project description

YamlBase

codecov Actions Status CodeFactor PyPI version GitHub version

This utility allows you to manage tables in a database using YAML files, which makes it faster to create and delete tables in multiple databases simultaneously

The following databases are currently supported:

Installation

pip install YamlBase

Config examples

SQLite config example

Click to expand!

base_example.yaml

db_type: "SQLite" # -  type of database
ip: "H:/YBase/" # - path to file with database 
db_name: "test_db" # - database file name

username: ""
password: ""

schemas: # - list of schemas in database (main - default in SQLite)

  main:

    table_1: # - table description example
      name: "table1" # - must be same as block name
      descriprion: "table for test" # - some custom descriprions
      permissions: [] # - unused in SQLite

      columns: # - list of columns 
        column1: # - column example
          name: "column1" # - must be same as block name
          type: "text" # - type of columns in SQLite
          is_pk: 1 # - is column a primary key 
          is_sk: 0 # - is column is secondary key (if 1 than defina sk_link)
          sk_link: 0 # - sk link for table (table.column)

actions_example.yaml

# table : action
# table must be in database if remove or in base_config if insert
# table1 : insert - insert action
# table2 : remove - remove action

Usage Example

To use this utility, you need 2 files, one is the configuration of new tables for the database, and the second is a file with a list of actions

File examples:

  • actions_example.yaml
  • base_example.yaml

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

YamlBase-0.1.tar.gz (20.4 kB view details)

Uploaded Source

File details

Details for the file YamlBase-0.1.tar.gz.

File metadata

  • Download URL: YamlBase-0.1.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for YamlBase-0.1.tar.gz
Algorithm Hash digest
SHA256 9999d7e2338d5ab1edddf63ab5fe9e6de787971c474db42f9b03f25b102dbbb3
MD5 17bf6ebe88996b0b02125ed4f27ee12f
BLAKE2b-256 62520137209112e6a8c7888b7e277a8b90f641c862a6002531f231162c22b41b

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