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.4 Improved ease of use
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 write 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.4.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.4-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dbine-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 56f1394ecaf316445ee67866614c32855abf68c7e434ce6ef39a4696b560722a
MD5 16679fba3cd97694ab50632dd0a20292
BLAKE2b-256 b216188968ed3111c511d962bce04fe2cb171819706a50229234016ca453c7a6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbine-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 03814fef73a5d9b7661ca721cbaf103a40593af46d233b6611008ebb837bdca5
MD5 4669cefee3e4e0e1b7dd43204de16d2d
BLAKE2b-256 eb76284948520d8a5b84e0d473bda9cb3b5e64ff8e345edbaef9607cdc9ad9f3

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