Skip to main content

Auxiliary tools related to databases

Project description

dbine

Auxiliary tools related to databases

Concept

PDF output from database table definitions

Database table definitions(MySQL)

DROP DATABASE IF EXISTS db;
CREATE DATABASE db;

DROP USER IF EXISTS _user_;
CREATE USER _user_ IDENTIFIED BY 'pass';

GRANT ALL ON db.* TO _user_;

DROP TABLE IF EXISTS no_comments;
CREATE TABLE no_comments (
  id INT PRIMARY KEY,
  name VARCHAR(10)
) COMMENT 'コメントなしテーブル';

DROP TABLE IF EXISTS with_comments;
CREATE TABLE with_comments (
  id INT PRIMARY KEY COMMENT 'ID',
  name VARCHAR(10) COMMENT '名前'
) COMMENT 'コメントつきテーブル';

DROP TABLE IF EXISTS relations;
CREATE TABLE relations (
  id INT PRIMARY KEY COMMENT 'ID',
  no_comment_id INT COMMENT 'コメントなしテーブルのID',
  with_comment_id INT COMMENT 'コメントつきテーブルのID'
);

PDF(PNG)

What is possible

  1. Log in to the database and get table definition information
  2. Output table definition information as an ER diagram-like image in PDF
  3. Convert PDF to image

Reason for development

  • I want to output the relationships between database table definitions as a PDF or image so that I can understand them at a glance

Supported database types

  • PostgreSQL
  • MySQL

Versions

Version Summary
0.1.3 Release dbine

Installation

dbine

pip install dbine

Graphviz

Required for PDF output

Poppler

Required for PDF image conversion

CLI

pdf.write

Write database table definition to PDF

1. Prepare database connection config file(database.yaml)

[database.yaml]

Type: MySQL
DatabaseName: db
UserName: _user_
Password: pass
Host: localhost
Port: 0

2. PDF output by CLI execution

dbine pdf.write database.yaml database.pdf

pdf.convert

Convert PDF to image

1. Image(PNG) conversion by CLI execution

dbine pdf.convert database.pdf database.png

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbine-0.1.3.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbine-0.1.3-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file dbine-0.1.3.tar.gz.

File metadata

  • Download URL: dbine-0.1.3.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for dbine-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d9f6233386808df3a97bb1e7b6bfbdf2bab1517610bdee554ebab0e1fe847ce8
MD5 0ffc0e9d1098e70211c03bc4b641f0a1
BLAKE2b-256 e7b060c066cc49fe33d39c05521d6802a40e96f031c6df665385f87b823d7274

See more details on using hashes here.

File details

Details for the file dbine-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: dbine-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for dbine-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dfe9832d3262db9a7fcc922c3c0abad2a42077463436588971ec5d8981c44827
MD5 4cfa91e7257e7b1c1d35fc4bfa09bd9b
BLAKE2b-256 611797b73053c2d180df07842794777b5aa89ae16303c9dca80d9cb9f65ed9ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page