Skip to main content

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()

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

data-readers-0.5.3.zip (12.2 kB view details)

Uploaded Source

File details

Details for the file data-readers-0.5.3.zip.

File metadata

  • Download URL: data-readers-0.5.3.zip
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for data-readers-0.5.3.zip
Algorithm Hash digest
SHA256 084728cbfa40617958e77a2961dd4ddb2f846c1b0a665ed10bd6075f8970ae2d
MD5 e364f17e0f509fed5bf94c4c5ab4ce07
BLAKE2b-256 e316e491f552ceaec6f2644562f34bb3a957b4ae9ac8c4508011544f80638de6

See more details on using hashes here.

Supported by

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