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

Uploaded Source

Built Distribution

deploydb-0.2.1-py2.py3-none-any.whl (10.9 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: deploydb-0.2.1.tar.gz
  • Upload date:
  • Size: 18.1 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.1.tar.gz
Algorithm Hash digest
SHA256 ff9d583da51ad17fc364c5226b3d7a0940025950f01bb026e094ca0a7773aee4
MD5 11fe9e3a7bdeacb3d792c1e8235f6b91
BLAKE2b-256 7a3b50b74f10aa0f54a68035e07b3dc35c7b2c1ef739d33ac0eeb8e53190e785

See more details on using hashes here.

File details

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

File metadata

  • Download URL: deploydb-0.2.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.9 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.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 de5091c6144d13bfd3aecce9de9428cd1b1ba798e14822daf87ecfba80e4d6f9
MD5 1f7a416d010409df7d808a5bb797b870
BLAKE2b-256 6a391f22b0929f77fc09dc51287532e31cc71330d12ab36b571b01ff9d112301

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