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

Uploaded Source

Built Distribution

deploydb-0.1.8-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.tar.gz.

File metadata

  • Download URL: deploydb-0.1.8.tar.gz
  • Upload date:
  • Size: 16.9 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.tar.gz
Algorithm Hash digest
SHA256 484eb32133e1374e97881c3c4742f061c6eed0f73c788d572c4ef475dd5873b0
MD5 a3896855794df834b1d422e51ffa5c45
BLAKE2b-256 8252c0e6982adc1a646b50b94185445622902968362e507b2b288be5fd2331b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: deploydb-0.1.8-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-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0b671983cedef18bdd45edc80fc971808146e5a5debd0bae20e8756aa677e3f6
MD5 9489645b1850042136bf2af0971b0666
BLAKE2b-256 978f3a68b2d3d2af608f6185c0661ddc8726019c4900552482d515e46ed06fe1

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