store
delete
delete(module_name, code_version=None, all=False, keep_only_latest=False, outer=None)
Deletes a module from the OakVar store and fetches the OakVar store.
PARAMETER | DESCRIPTION |
---|---|
module_name |
Module name
TYPE:
|
code_version |
Version number of the module
TYPE:
|
all |
TYPE:
|
keep_only_latest |
TYPE:
|
outer |
DEFAULT:
|
RETURNS | DESCRIPTION |
---|---|
bool
|
|
fetch
fetch(refresh_db=False, clean_cache_files=False, clean=False, publish_time='', outer=None)
Fetches OakVar store cache.
PARAMETER | DESCRIPTION |
---|---|
refresh_db |
TYPE:
|
clean_cache_files |
TYPE:
|
clean |
TYPE:
|
publish_time |
TYPE:
|
outer |
DEFAULT:
|
RETURNS | DESCRIPTION |
---|---|
bool
|
|
login
login(email=None, pw=None, interactive=False, relogin=False, outer=None)
Logs in to the OakVar store.
PARAMETER | DESCRIPTION |
---|---|
email |
Email of an OakVar store account
TYPE:
|
pw |
Password of an OakVar store account
TYPE:
|
interactive |
If
TYPE:
|
relogin |
If
TYPE:
|
outer |
DEFAULT:
|
RETURNS | DESCRIPTION |
---|---|
Dict[str, Any]
|
Result of login as a dict, with the fields |
logout
logout(outer=None)
Logs out from the OakVar store.
PARAMETER | DESCRIPTION |
---|---|
outer |
DEFAULT:
|
RETURNS | DESCRIPTION |
---|---|
bool
|
|
register
register(module_name, url_file=None, code_url=[], data_url=[], overwrite=False, outer=None)
Register a module in the OakVar store.
PARAMETER | DESCRIPTION |
---|---|
module_name |
Module name
TYPE:
|
code_url |
URLs of code zip files
TYPE:
|
data_url |
URLs of data zip files
TYPE:
|
url_file |
Path to a yaml file which contains the URLs of code and data zip files.
TYPE:
|
overwrite |
overwrite
TYPE:
|
outer |
DEFAULT:
|
error |
|
RETURNS | DESCRIPTION |
---|---|
bool
|
|
Examples:
Pack custommodule
module to produce custommodule__1.0.0__code.zip
and custommodule__1.0.0__data.zip
.
>>> oakvar.api.module.pack("custommodule")
Upload the two files to https://module.storage.com/annotators/custommodule__1.0.0__code.zip
and https://module.storage.com/annotators/custommodule__1.0.0__data.zip
.
Then, register the module.
>>> oakvar.api.store.register("custommodule",\
code_url=\
["https://module.storage.com/annotators/custommodule__1.0.0__code.zip"],\
data_url=\
["https://module.storage.com/annotators/custommodule__1.0.0__data.zip"])
url_file.yml
for this registration can be made:
- code:
- https://module.storage.com/annotators/custommodule__1.0.0__code.zip
- data:
- https://module.storage.com/annotators/custommodule__1.0.0__data.zip
and used:
>>> oakvar.api.store.register("custommodule", url_file="url_file.yml")
url
url(url='', outer=None)
Gets or sets the URL of the OakVar store.
PARAMETER | DESCRIPTION |
---|---|
url |
OakVar Store URL to use
TYPE:
|
outer |
DEFAULT:
|
RETURNS | DESCRIPTION |
---|---|
str
|
str of the OakVar Store URL |