Skip to main content

Deploy your database objects automatically when the git branch is updated.

Project description

deploydb

Deploy your database objects automatically when the git branch is updated.

  • Production-ready! ⚙️
  • Easy-to-use 🔨
  • Customizable 🔧

Installation

Install the latest package. pip install deploydb

Usage

1- Create configuration file ( json file or dict )

Property Description
local_path where the local repository will be located
https_url or ssh_url address to be listen
target_branch branch to handle changes
servers a list of server credentials

Example: config.json

{
    "local_path": "",
    "https_url": "",
    "ssh_url": "",
    "target_branch": "",
    "servers": [
        {
            "driver": "ODBC Driver 17 for SQL Server",
            "server": "server-address-or-instance-name",
            "server_alias": "Staging",
            "user": "your-username",
            "passw": "your-password"
        }
    ]
}

2- Listener will listen every changes with sync method.

from deploydb import Listener

deploy = Listener('config.json')
deploy.sync(loop=True)

Repo Generator

If you does not have any existing repository. You can easily export your database objects then create your repository.

from deploydb import RepoGenerator

scripter = RepoGenerator(
    config="config.json",
    export_path="path-to-export",
    databases=[]  # Default takes all databases from the given credential if not specified.
)
scripter.run()

RepoGenerator will extract objects structure as below.

path-to-export
│
└───Server-X
    │    └───DB-X
    │    │   └───Tables
    │    │   └───Views
    │    │   └───Functions
    │    │   └───Stored-Procedures
    │    │   └───Triggers
    │    │   └───Types
    │    │   └───DMLs
    │    │   └───DDLs
    |    |
    │    N-Database
    N-Server

TODO

  • Creating Services for Continuous Integration

    • Windows Service
    • Linux Systemd Service
  • Getting Notifications

    • Microsoft Teams Webhook Integration
    • Slack Webhook Integration

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

deploydb-0.1.8.3.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

deploydb-0.1.8.3-py2.py3-none-any.whl (9.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file deploydb-0.1.8.3.tar.gz.

File metadata

  • Download URL: deploydb-0.1.8.3.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for deploydb-0.1.8.3.tar.gz
Algorithm Hash digest
SHA256 0167aecc3a110c16ac42b58d51866dc6c893843ae761ad519d57521f5bb0610d
MD5 3cf10a114aecfacab1759a2f98a00612
BLAKE2b-256 41056816ce4146110082fbc14dfae3b5c13f26077b909bf7068081a579b446f0

See more details on using hashes here.

File details

Details for the file deploydb-0.1.8.3-py2.py3-none-any.whl.

File metadata

  • Download URL: deploydb-0.1.8.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for deploydb-0.1.8.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 57393db0f84cca2d3898a863204f7a8786760f2a193aafe9203cd49648868fa5
MD5 4019e673a00ee3c86e2093416c81ae13
BLAKE2b-256 3df860520f832c974c86bfdd271b2f759f797d56968d1e442cdec42fd98bc932

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