Shortcuts

mmeval.fileio

File Backend

BaseStorageBackend

Abstract class of storage backends.

LocalBackend

Raw local storage backend.

HTTPBackend

HTTP and HTTPS storage bachend.

LmdbBackend

Lmdb storage backend.

MemcachedBackend

Memcached storage backend.

PetrelBackend

Petrel storage backend (for internal usage).

register_backend

Register a backend.

File Handler

BaseFileHandler

A base class for file handler.

JsonHandler

A Json handler that parse json data from file object.

PickleHandler

A Pickle handler that parse pickle data from file object.

YamlHandler

A Yaml handler that parse yaml data from file object.

register_handler

A decorator that register a handler for some file extensions.

File IO

load

Load data from json/yaml/pickle files.

exists

Check whether a file path exists.

get

Read bytes from a given filepath with ‘rb’ mode.

get_file_backend

Return a file backend based on the prefix of uri or backend_args.

get_local_path

Download data from filepath and write the data to local path.

get_text

Read text from a given filepath with ‘r’ mode.

isdir

Check whether a file path is a directory.

isfile

Check whether a file path is a file.

join_path

Concatenate all file paths.

list_dir_or_file

Scan a directory to find the interested directories or files in arbitrary order.

Parse File

dict_from_file

Load a text file and parse the content as a dict.

list_from_file

Load a text file and parse the content as a list of strings.

Read the Docs v: latest
Versions
latest
stable
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.