Metadata-Version: 2.1
Name: dbplot
Version: 0.1.0
Summary: dbplot allows you to make calculations of plots inside databases
Home-page: https://github.com/danielfrg/dbplot
License: Apache-2.0
Author: Daniel Rodriguez
Author-email: df.rodriguez143@gmail.com
Requires-Python: >=3.5,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Requires-Dist: ibis-framework (>=0.14,<0.15)
Requires-Dist: matplotlib (>=3.0,<4.0)
Project-URL: Repository, https://github.com/danielfrg/dbplot
Description-Content-Type: text/markdown

# dbplot

dbplot allows you to make calculations for plots inside databases.

dbplot is powered by [ibis](https://github.com/ibis-project/ibis) so its possible to target multiple databases that include:
Postgres, MySQL, Apache Impala, Apache Kudu, BigQuery [and more](https://docs.ibis-project.org/), also everything that ibis will support
in the future such as Apache Spark.

## Install

```
pip install dbplot
```

Development version:

```
pip install git+git://github.com/danielfrg/dbplot.git
```

## Usage

See [notebooks]() for examples.

```python
import os
import ibis
import dbplot

# Connect to DB
host = os.environ.get("DBPLOT_TEST_POSTGRES_HOST", "localhost")
user = os.environ.get("DBPLOT_TEST_POSTGRES_USER", "postgres")
password = os.environ.get("DBPLOT_TEST_POSTGRES_PASSWORD")
database = os.environ.get("DBPLOT_TEST_POSTGRES_DATABASE", "nycflights13")
con = ibis.postgres.connect(host=host, database=database, user=user, password=password)

# Get a table
flights = con.table("flights")

# Plot stuff
dbplot.hist(flights, flights.dep_time, nbins=20)
```

## Roadmap

- Automated tests
- More plots such as raster plots, line charts and more :)

## Notes

Based on [dbplot for R](https://github.com/edgararuiz/dbplot).

