Skip to main content

Loads data from various formats

Project description

Given a source of rowlike data, acts as a generator of OrderedDicts.

Usage:

src = Source('mydata.csv')
for row in src:
    print(row)

data-dispenser thus serves as a single API for a variety of data sources.

  • Free software: MIT license

Data source types supported

  • file names / paths
  • open file objects
  • pymongo Collection objects
  • strings interpretable as data
  • actual Python data objects

Will work most reliably against filenames with extensions that indicate the data format; otherwise data-dispenser may guess the input format wrong.

Data input formats supported

  • csv
  • yaml (requires pyyaml)
  • json
  • pickle
  • eval-able Python
  • xml (experimental)

Multiple files

File paths with wildcards will be effectively concatenated into one large data source.

Load limits

Large data sources could overwhelm your system’s memory. Passing a limit keyword to the Source constructor limits the rows returned from each source. For file paths with wildcards, the limit applies to each file source, not to the number of file sources.

History

0.1.0 (2014-05-21)

  • First release on PyPI.

Project details


Download files

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

Files for data_dispenser, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size data_dispenser-0.1.0-py3.4.egg (10.7 kB) File type Egg Python version 3.4 Upload date Hashes View
Filename, size data_dispenser-0.1.0.tar.gz (7.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page