Simple Database healthchecker using Click to verify connections before executing tasks.
DbStatus DOES NOT connect to the server, only the database. Accessing other databases is doable however you can not view them without knowing the URI
Example SQL Scripts are available in the sqlscripts
directory to mess around with
Currently only works with PostgreSQL, other server compatibility coming soon
- Python3 (shady compatibility with Python2)
- Git
- Databases to connect to
- Package is not hosted on Pypi yet, use developer install without a virtual environment to use it globally. Package will soon be pip installable
- Clone or fork the repository
git clone https://github.com/connormullett/DB-StatusCLI.git && cd DB-StatusCLI
- create a virtual environment if desired, however CLI will only be available while the virtual evironment is activated
pip install -r requirements.txt
pip install -e .
This will install the CLI as an editable package and you will be able to usedbstat
in terminal to start the CLI
dbstat
- the entry point for the CLI, usedbstat --help
- This CLI requires you to run either command
dbstat set-url
ordbstat createconf
to run.createconf
will create adbstatus.ini
file that contains the necessary information to run the CLI and ping a database. set-url
- will create the config file if it doesn't exist, but will also change the uri if it has already been setdbstat check
- Uses the database uri from the previously mentioned config file, unless--uri
or-u
is specified, and checks if a connection is made.dbstat sql-shell
- start shell for executing sql queries. Uses the URI in config file or what is specified with-u
/--uri
- Health check database (verify connection is made)
- Shell for executing SQL queries
- Check URI from CLI
- Load file and execute full scripts
- Change URI in Shell
- Command History
- Execute query from CLI without going into shell
- Detailed debugging for health check fails
- In Progress :: More Shell Commands
- Not Started :: Execute SQL from file
- In Progress :: Change URI in shell
- Not Started :: Command History