项目作者: flarco

项目描述 :
A Python/VueJS database client (Web GUI) to access Oracle, Spark (Hive), Postgres, etc.
高级语言: Vue
项目地址: git://github.com/flarco/dbnet.git
创建时间: 2018-08-24T09:53:17Z
项目社区:https://github.com/flarco/dbnet

开源协议:GNU General Public License v3.0

下载



Logo

DbNet is a Python/VueJS database client to access Oracle, Spark (Hive), Postgres, etc. It is still a work in progess, but should work fine for daily use. MS SQL Server is supported, although with some bugs here and there due to JDBC/JTDS bridge.

Only Chrome and Firefox are supported at the moment.

Running with Docker

docker run --rm -it -p 5566:5566 -v $HOME/dbnet:/root/dbnet flarco/dbnet --serve

Running with python

  1. pip install dbnet

Command dbnet should now be available in the PATH.

dbnet --help

  1. usage: dbnet [-h] [--serve] [--init_db] [--reset_db] [--force] [--port PORT]
  2. DbNet Application
  3. optional arguments:
  4. -h, --help show this help message and exit
  5. --serve Start the DbNet server
  6. --init_db Initiatlize the backend SQLite database
  7. --reset_db Reset the backend SQLite database
  8. --force Kill any running instance.
  9. --port PORT The web application port

dbnet --serve

  1. 2019-02-27 10:08:11 -- DB Tables OK.
  2. 2019-02-27 10:08:11 -- Main Loop PID is 39685
  3. 2019-02-27 10:08:11 -- Monitor Loop PID is 39691
  4. 2019-02-27 10:08:11 -- Web Server PID is 39692
  5. 2019-02-27 10:08:11 -- URL -> http://macbook:5566/?token=CqPahSJIeg1Nl4Kj
  6. (39692) wsgi starting up on http://0.0.0.0:5566

Setting up Dababase Profile

Your database profile / credentials needs to be set up at ~/profile.yaml or env var PROFILE_YAML.
Run command xutil-create-profile to create from template.

Example Entry

  1. PG_XENIAL:
  2. name: PG_XENIAL
  3. host: xenial-server
  4. database: db1
  5. port: 5432
  6. user: user
  7. password: password
  8. type: postgresql
  9. jdbc_url: "jdbc:postgresql://xenial-server:5432/db1?&ssl=false"

Environment variables

  • DBNET_WEBAPP_PORT = Web application port (default is 5566)
  • DBNET_WEBAPP_HOST = Web application host (default is 0.0.0.0)
  • DBNET_PASSWD = password to access application (default is random string)
  • DBNET_WORKER_PREFIX = database worker name prefix (default is dbnet)
  • DBNET_FOLDER = local storage / queries folder (default ~/dbnet)
  • DBNET_MAX_WORKER_PER_DB = the maximum number of workers per database (default is 3)
  • DBNET_APPRISE_URL = the apprise URL to send notifications to.
  • DBNET_DB_URL = the database URL to connect to (only one DB).

Screenshots

Screenshot 2

Screenshot 1

Screenshot schema

Development

Install Vue & Dependencies

  1. npm install -g @vue/cli @vue/cli-service @vue/cli-plugin-babel @vue/cli-plugin-eslint
  2. git clone https://github.com/flarco/dbnet.git
  3. cd dbnet/frontend
  4. npm install

Building

  1. git clone https://github.com/flarco/dbnet.git
  2. cd dbnet
  3. bash build.sh

Release

  1. git clone https://github.com/flarco/dbnet.git
  2. cd dbnet
  3. m2r --overwrite README.md
  4. python setup.py sdist && twine upload --skip-existing dist/*