Skip to main content

Deploy your 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 🔧

Getting started..

1- Install the latest package.

pip install deploydb

2- Add Configurations ( json file or dict )

Property Description
local_path where the local repository will be located
https_url or ssh_url https or ssh url is required
target_branch to trigger branch name
server a list of server credentials

config.json

{
    "local_path": "E:\\deployment",
    "https_url": "",
    "ssh_url": "git@github.com:****/****.git",
    "target_branch": "main",
    "servers": [
        {
            "driver": "ODBC Driver 17 for SQL Server",
            "server": "127.0.0.1",
            "server_alias": "Staging",
            "user": "your-db-user",
            "passw": "your-password"
        },
    ]
}

3- Export your database objects then push / upload the exported files to your repository.

from deploydb.repo_generator import RepoGenerator

RepoGenerator("config.json", "path-to-export").run()

Repo-Generator will extract objects structure as below.

root-project-folder
│
└───DataCenter-X
    │    └───DB-001
    │    │   └───Tables
    │    │   └───Views
    │    │   └───Functions
    │    │   └───Stored-Procedures
    │    │   └───Triggers
    │    │   └───Types
    │    │   └───DMLs
    │    │   └───DDLs
    |    |
    │    N-Database
    N-Server

4- Pull the target branch from remote and initiate sync.

from deploydb import Listener

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

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

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: deploydb-0.1.0.tar.gz
  • Upload date:
  • Size: 16.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.0.tar.gz
Algorithm Hash digest
SHA256 c152520b9f3f55126ab0bd3c2e539bedb17f2f9e35e453ebc2437147b839ac48
MD5 03846e53e523468c8bbb18454096fa74
BLAKE2b-256 415ee18ee0a48b4af6cfa69416ec78fdecf0fa89d46e5607d15cb7253d0df067

See more details on using hashes here.

File details

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

File metadata

  • Download URL: deploydb-0.1.0-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.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 52d7951c096430bc9d20ae04efeed23d8be12e19777430947eb0c4247f23837e
MD5 ee11a5d9857150caac0133f5d32f58c4
BLAKE2b-256 6a9fb35471b59a02e0b42e0b0409a8852196fb9ef551c809717d02a91c92abc8

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