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
│
└───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
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.1.tar.gz
(15.9 kB
view details)
Built Distribution
File details
Details for the file deploydb-0.1.1.tar.gz
.
File metadata
- Download URL: deploydb-0.1.1.tar.gz
- Upload date:
- Size: 15.9 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 | 8f2b1c5969440dbf78ed14a0c919ea2a6bb4a2defcee0f79b5b3e4180aa865bf |
|
MD5 | 467b47c51584709b4307e14c9c597e03 |
|
BLAKE2b-256 | f7095711b172a1190410a1925018ea1c58604944da201dad278f7cb0ff139279 |
File details
Details for the file deploydb-0.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: deploydb-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 10.7 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 | fa6e794667dc00cb5392dbf2a540d64f7bc160477214f5d93b2768f1968c4fd3 |
|
MD5 | 2535bc0de1d967c1bd7dfcc25fcd4e34 |
|
BLAKE2b-256 | 89057921e722af30b9f34199d005ba51dcaf41b3907bccdfdb210cf7c1ad1012 |