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

generator = RepoGenerator(config="config.json", export_path="path-to-export")
generator.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 a Windows Service

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

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: deploydb-0.1.6.tar.gz
  • Upload date:
  • Size: 15.2 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.6.tar.gz
Algorithm Hash digest
SHA256 63ded04dc7ac27842f2199632ae6e34af01baf34fa4b5a57b6f766ad25bb758b
MD5 75479646e4ead67d987cdb8ba30bf5d5
BLAKE2b-256 1e2afd2d723463007e0e017948b505f91ffdc834f95fa09ae5d30a6890a4265f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: deploydb-0.1.6-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.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f2f604501c35d4a308deb913b9f9f5d61895680bc8cf62aa358ffa71408faa3f
MD5 76cddda8e840e7d610ca71c4025e92da
BLAKE2b-256 ec8697dbc7d048ece5da45398fb37240b5a2c849067e816e9fd3314533144382

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