OpenDataLab Python SDK
Slowing down. Last release over 3 years ago, little activity since. Fine for existing code; think twice for a new project.
pip install opendatalabOpenDataLab Python SDK
IMPORTANT: OpenDataLab SDK WIP, not ensure the necessary compatibility of OpenAPI and SDK. As a result, please use the SDK with the latest version.
OpenDataLab Python SDK is a python library to access Opendatalab
and use open datasets.
It provides:
- A pythonic way to access opendatalab resources.
- A convenient CLI tool
odlto access open datasets.
Installation
$ pip3 install opendatalab
Usage:
An account is needed to access to opendatalab platform. Please visit offical websit to get the account username and password first.
Help
Show cmd help
$ odl -h
$ odl --help
Usage: odl [OPTIONS] COMMAND [ARGS]...
You can use `odl <command>` to access open datasets.
Options:
--version Show the version and exit.
-h, --help Show this message and exit.
Commands:
get Get(Download) dataset files into local path.
info Print dataset info.
login Login opendatalab with account.
logout Logout opendatalab account.
ls List files of the dataset.
search Search dataset info.
version Show opendatalab version.
Version
$ odl version
odl version, current: 0.0.6, svc: 1.8
Login
Login with opendatalab username and password. If you haven't an opendatalab account,please register with link: https://opendatalab.org.cn/
$ odl login
Username []: someone@example.com
Password []:
Login successfully as someone@example.com
or
$ odl login -u someone@example.com
Password[]:
Logout
Logout current opendatalab account