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

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: deploydb-0.2.0.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.2.0.tar.gz
Algorithm Hash digest
SHA256 ea6c00d75aa09cd4715f95b512ef114e2d328b2f0d08434190582f290fc862ac
MD5 2e9944e09060e6a38f0546bf33385162
BLAKE2b-256 80e6938dee4da87908dadc91620e2197459968695465cc4c22156d1232445a12

See more details on using hashes here.

File details

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

File metadata

  • Download URL: deploydb-0.2.0-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.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ebf7a9f46b648dd398316bb953ce3f5e1c721ad0ee08ab78faa0fe3a2edb802f
MD5 7bab025bcfd985b6fb4523de1ac721da
BLAKE2b-256 b918d70e3d56b053e2b2118266fb3364bdbf74ee3571c433e2832c6d2b39e36d

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