Metadata-Version: 2.1
Name: dbcl
Version: 0.1.27
Summary: A database command line interface that is engine-agnostic.
License: MIT
Author: Kris Steinhoff
Author-email: ksteinhoff@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: SQLAlchemy (>=1.4.46,<2.0.0)
Requires-Dist: prompt-toolkit (>=2.0.10,<3.0.0)
Requires-Dist: pygments (>=2.2.0,<3.0.0)
Requires-Dist: terminaltables (>=3.1.0,<4.0.0)
Description-Content-Type: text/markdown

# dbcl - Database Command Line
[![Build Status](https://travis-ci.org/ksofa2/dbcl.svg?branch=master)](https://travis-ci.org/ksofa2/dbcl)
[![Maintainability](https://api.codeclimate.com/v1/badges/e4663675580964433469/maintainability)](https://codeclimate.com/github/ksofa2/dbcl/maintainability)


An engine-agnostic database command line interface.


## Installation

Use `pip` to install the dbcl tool:

```
pip install dbcl
```

Also install the necessary packages for your database, for example: `cx_Oracle`, `pg8000` or `PyMySQL`.


## Database connection

Database connections are specified using [SQLAlchemy database URLs](http://docs.sqlalchemy.org/en/latest/core/engines.html#database-urls). The database URL can be given as an argument to the `dbcl` command:

```
dbcl sqlite:///database.db
```

If the URL isn't given as an argument, a prompt will ask for the URL to use for the connection:

```
$ dbcl
Connect to [sqlite:///database.db]:
```

If the DATABASE_URL environmental variable is set, that value will be the default for the database prompt:

```
$ export DATABASE_URL=sqlite:///database.db
$ dbcl
Connect to [sqlite:///database.db]:
```

Example of a connection to a PostgreSQL database using wht `pg8000` package:

```
dbcl postgresql+pg8000://username:password@127.0.0.1:5432/dbname
```

