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 |
db_creds |
a list of server credentials |
Example: config.json
{
"local_path": "",
"https_url": "",
"ssh_url": "",
"target_branch": "main",
"db_creds": {
"driver": "ODBC Driver 17 for SQL Server",
"server": "server-address-or-instance-name",
"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",
includes=[], # Default takes all databases from the given credential if not specified.
excludes=[]
)
scripter.run()
RepoGenerator
will extract objects structure as below.
.
├── Databases
│ ├── Your-Db-Name
│ │ ├── DDLs
│ │ ├── DMLs
│ │ ├── Functions
│ │ ├── Stored-Procedures
│ │ ├── Tables
│ │ ├── Triggers
│ │ ├── Types
│ │ └── Views
│ └── Database-N
└── README.md
TODO
-
Creating Services for Continuous Integration
- Windows Service
- Linux Systemd Service
-
Getting Notifications
- Microsoft Teams Webhook Integration
- Slack Webhook Integration
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
Built Distribution
File details
Details for the file deploydb-0.2.3.tar.gz
.
File metadata
- Download URL: deploydb-0.2.3.tar.gz
- Upload date:
- Size: 19.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.2.0 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 | fed2a20c8df893724305994ac13a64a0673e89bce2f99ffe4f67e083f929fa2f |
|
MD5 | 590ccff41a9bae1e0543bc3d58655d48 |
|
BLAKE2b-256 | 7cfc42cacc5628c0922fb7c538690beb1c9e6d8c07590862c67192c838980f07 |
File details
Details for the file deploydb-0.2.3-py2.py3-none-any.whl
.
File metadata
- Download URL: deploydb-0.2.3-py2.py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.2.0 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 | e3cf411316376883973265e982062066aab1d469b0be7e5565cc2b92dbc86ccf |
|
MD5 | 65fa4e94a886771194fc1eaa9229a2f3 |
|
BLAKE2b-256 | 61bfb6e9efc624b145917f039d46180b3695367a9bcaf78f73f98eaedeb0a36e |