Usage

Functions

dump_df(key, *subkeys, name, obj[, sep, ...])

Dump a dataframe to a TSV file with pandas.

dump_json(key, *subkeys, name, obj[, ...])

Dump an object to a file with json.

dump_pickle(key, *subkeys, name, obj[, ...])

Dump an object to a file with pickle.

dump_rdf(key, *subkeys, name, obj[, format, ...])

Dump an RDF graph to a file with rdflib.

dump_xml(key, *subkeys, name, obj[, ...])

Dump an XML element tree to a file with lxml.

ensure(key, *subkeys, url[, name, force, ...])

Ensure a file is downloaded.

ensure_csv(key, *subkeys, url[, name, ...])

Download a CSV and open as a dataframe with pandas.

ensure_custom(key, *subkeys, name[, force])

Ensure a file is present, and run a custom create function otherwise.

ensure_excel(key, *subkeys, url[, name, ...])

Download an excel file and open as a dataframe with pandas.

ensure_from_google(key, *subkeys, name, file_id)

Ensure a file is downloaded from google drive.

ensure_from_s3(key, *subkeys, s3_bucket, s3_key)

Ensure a file is downloaded.

ensure_gunzip(key, *subkeys, url[, name, ...])

Ensure a file is downloaded and gunzipped.

ensure_json(key, *subkeys, url[, name, ...])

Download JSON and open with json.

ensure_json_bz2(key, *subkeys, url[, name, ...])

Download BZ2-compressed JSON and open with json.

ensure_open(key, *subkeys, url[, name, ...])

Ensure a file is downloaded and open it.

ensure_open_bz2(key, *subkeys, url[, name, ...])

Ensure a BZ2-compressed file is downloaded and open a file inside it.

ensure_open_gz(key, *subkeys, url[, name, ...])

Ensure a gzipped file is downloaded and open a file inside it.

ensure_open_lzma(key, *subkeys, url[, name, ...])

Ensure a LZMA-compressed file is downloaded and open a file inside it.

ensure_open_sqlite(key, *subkeys, url[, ...])

Ensure and connect to a SQLite database.

ensure_open_sqlite_gz(key, *subkeys, url[, ...])

Ensure and connect to a gzipped SQLite database.

ensure_open_tarfile(key, *subkeys, url, ...)

Ensure a tar file is downloaded and open a file inside it.

ensure_open_zip(key, *subkeys, url, inner_path)

Ensure a file is downloaded then open it with zipfile.

ensure_pickle(key, *subkeys, url[, name, ...])

Download a pickle file and open with pickle.

ensure_pickle_gz(key, *subkeys, url[, name, ...])

Download a gzipped pickle file and open with pickle.

ensure_rdf(key, *subkeys, url[, name, ...])

Download a RDF file and open with rdflib.

ensure_readme()

Ensure there's a README in the PyStow data directory.

ensure_tar_df(key, *subkeys, url, inner_path)

Download a tar file and open an inner file as a dataframe with pandas.

ensure_tar_xml(key, *subkeys, url, inner_path)

Download a tar file and open an inner file as an XML with lxml.

ensure_untar(key, *subkeys, url[, name, ...])

Ensure a file is downloaded and untarred.

ensure_xml(key, *subkeys, url[, name, ...])

Download an XML file and open it with lxml.

ensure_zip_df(key, *subkeys, url, inner_path)

Download a zip file and open an inner file as a dataframe with pandas.

ensure_zip_np(key, *subkeys, url, inner_path)

Download a zip file and open an inner file as an array-like with numpy.

get_config(module, key, *[, passthrough, ...])

Get a configuration value.

join(key, *subkeys[, name, ensure_exists])

Return the home data directory for the given module.

joinpath_sqlite(key, *subkeys, name)

Get an SQLite database connection string.

load_df(key, *subkeys, name[, read_csv_kwargs])

Open a pre-existing CSV as a dataframe with pandas.

load_json(key, *subkeys, name[, ...])

Open a JSON file json.

load_pickle(key, *subkeys, name[, mode, ...])

Open a pickle file with pickle.

load_pickle_gz(key, *subkeys, name[, mode, ...])

Open a gzipped pickle file with pickle.

load_rdf(key, *subkeys[, name, parse_kwargs])

Open an RDF file with rdflib.

load_xml(key, *subkeys, name[, parse_kwargs])

Load an XML file with lxml.

module(key, *subkeys[, ensure_exists])

Return a module for the application.

open(key, *subkeys, name[, mode, open_kwargs])

Open a file that exists already.

open_gz(key, *subkeys, name[, mode, open_kwargs])

Open a gzipped file that exists already.

write_config(module, key, value)

Write a configuration value.

Classes

Module(base[, ensure_exists])

The class wrapping the directory lookup implementation.