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 🔧
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
│
└───Server-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
Release history Release notifications | RSS feed
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.5.tar.gz
(15.1 kB
view details)
Built Distribution
File details
Details for the file deploydb-0.1.5.tar.gz
.
File metadata
- Download URL: deploydb-0.1.5.tar.gz
- Upload date:
- Size: 15.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54b7811d4c701fad381282237d93864b562554eb634439b6d151d757eb968d51 |
|
MD5 | 2698f00d55c4cbe7f5388a901a4ac82e |
|
BLAKE2b-256 | 3d40e181351859655cccdb0377a70b80b6ef2e8f95714b77451a9735cf0361c4 |
File details
Details for the file deploydb-0.1.5-py2.py3-none-any.whl
.
File metadata
- Download URL: deploydb-0.1.5-py2.py3-none-any.whl
- Upload date:
- Size: 9.2 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | b66ae42eb03809e90638dfb563a370ef68fab0728a661573f48d9b4e7589dbce |
|
MD5 | 46e12f83c13a8e3d7892e17416494d1d |
|
BLAKE2b-256 | 2bfe226e9871de8bfcf3df2f48e810b371d35b267bc6226a02c1523f8a181fbe |