Skip to main content

dbplot allows you to make calculations of plots inside databases

Project description

dbplot

dbplot allows you to make calculations for plots inside databases.

dbplot is powered by ibis so its possible to target multiple databases that include: Postgres, MySQL, Apache Impala, Apache Kudu, BigQuery and more, 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.

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.

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

dbplot-0.1.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

dbplot-0.1.0-py3-none-any.whl (31.5 kB view details)

Uploaded Python 3

File details

Details for the file dbplot-0.1.0.tar.gz.

File metadata

  • Download URL: dbplot-0.1.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.11 CPython/3.7.1 Darwin/18.2.0

File hashes

Hashes for dbplot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 22a79fdafe6ea0b65917fe53ed3abd3662b5c546d7317a37aa9041e51c8548aa
MD5 ae295dd54afffcc16758cecadd109035
BLAKE2b-256 1d7cd7c8617cb11b6e56129f4a7f226aaaecdbde2389c11c6403bda1ae79e647

See more details on using hashes here.

File details

Details for the file dbplot-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dbplot-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 31.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.11 CPython/3.7.1 Darwin/18.2.0

File hashes

Hashes for dbplot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c5a7b141b7fdd2f16cd81cfb454faf8a3cd87b0dc9d7e51f1f9007dd203e1ba
MD5 fa4d37f51ec645b10b7f059dc5e0dbe2
BLAKE2b-256 fcadec0eac4b9066421e2aff507962ce858959896892dc2acb3347ccc86b2c51

See more details on using hashes here.

Supported by

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