Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Read from multiple databases and formats easily from python

Project Description

Description

This project is useful in any scenario where you need to read some data in a useable manner quickly and easily.

It can be used to read from:

  • csv
  • sqlite
  • mysql
  • redis
  • mongo
  • postgres
  • aerospike

Look at https://pypi.python.org/pypi/data-writers/ to write to them. This library was written with the intention to be useful without data-writers but they work very well together.

Setup

Install

pip install data-readers

Usage

Import DataReader

from datareaders.datareader import DataReader

csv

list_of_dicts = DataReader(reader=’csv’, database=’data.csv’).read()

sqlite

list_of_dicts = DataReader(reader=’sqlite’, database=’data.sqlite’, table=’DataTable’).read()

mysql

list_of_dicts = DataReader(reader=’mysql’, database=’data’, user=’root’, table=’DataTable’).read()

redis

list_of_dicts = DataReader(reader=’redis’, database=‘1’).read()

mongo

list_of_dicts = DataReader(reader=’mongo’, database=’data’, table=’DataTable’).read()

postgres

list_of_dicts = DataReader(reader=’postgres’, database=’data’, table=’DataTable’).read()

aerospike

list_of_dicts = DataReader(reader=’aerospike’, namespace=’data’, set=’DataTable’).read()
Release History

Release History

This version
History Node

0.5.3

History Node

0.5.2

History Node

0.5.1

History Node

0.5.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
data-readers-0.5.3.zip (12.2 kB) Copy SHA256 Checksum SHA256 Source Jul 22, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting