Command Line ToolΒΆ
usage: ucare [-h] [--version] [--pub_key PUB_KEY] [--secret SECRET] [--api_base API_BASE] [--upload_base UPLOAD_BASE] [--no_check_upload_certificate] [--no_check_api_certificate] [--api_version API_VERSION] {list_files,list_groups,get,store,delete,upload_from_url,upload,create_group,sync} ...
- Options:
--version show program’s version number and exit --pub_key API key, if not set is read from uploadcare.ini and ~/.uploadcare config files --secret API secret, if not set is read from uploadcare.ini and ~/.uploadcare config files --api_base API url, can be read from uploadcare.ini and ~/.uploadcare config files. Default value is https://api.uploadcare.com/ --upload_base Upload API url, can be read from uploadcare.ini and ~/.uploadcare config files. Default value is https://upload.uploadcare.com/ --no_check_upload_certificate=False Don’t check the uploading API server certificate. Can be read from uploadcare.ini and ~/.uploadcare config files. --no_check_api_certificate=False Don’t check the REST API server certificate. Can be read from uploadcare.ini and ~/.uploadcare config files. --api_version API version, can be read from uploadcare.ini and ~/.uploadcare config files. Default value is 0.5 - Sub-commands:
- list_files
list all files
usage: ucare list_files [-h] [--starting_point STARTING_POINT] [--ordering ORDERING] [--limit LIMIT] [--request_limit REQUEST_LIMIT] [--stored {True,False,None}] [--removed {True,False,None}]
- Options:
--starting_point a starting point for filtering files --ordering specify the way the files should be sorted --limit=100 files to show --request_limit=100 files per request --stored filter stored files
Possible choices: True, False, None
--removed=False filter removed files
Possible choices: True, False, None
- list_groups
list all groups
usage: ucare list_groups [-h] [--starting_point STARTING_POINT] [--ordering ORDERING] [--limit LIMIT] [--request_limit REQUEST_LIMIT]
- Options:
--starting_point a starting point for filtering groups --ordering specify the way the groups should be sorted --limit=100 group to show --request_limit=100 groups per request
- get
get file info
usage: ucare get [-h] path
- Positional arguments:
path file path
- store
store file
usage: ucare store [-h] [--timeout TIMEOUT] [--wait | --nowait] paths [paths ...]
- Positional arguments:
paths file(s) path - Options:
--timeout=5 Set wait seconds until operation completed. Default value is 5 seconds --wait=True Wait for operation to be completed --nowait=True Do not wait for operation to be completed
- delete
request delete
usage: ucare delete [-h] [--timeout TIMEOUT] [--wait | --nowait] paths [paths ...]
- Positional arguments:
paths file(s) path - Options:
--timeout=5 Set wait seconds until operation completed. Default value is 5 seconds --wait=True Wait for operation to be completed --nowait=True Do not wait for operation to be completed
- upload_from_url
upload file from url
usage: ucare upload_from_url [-h] [--store | --nostore] [--info | --noinfo] [--cdnurl] [--timeout TIMEOUT] [--wait | --nowait] url
- Positional arguments:
url file url - Options:
--store=False Store uploaded file --nostore=True Do not store uploaded file --info=False Get uploaded file info --noinfo=True Do not get uploaded file info --cdnurl=False Store file and get CDN url. --timeout=30 Set wait seconds file uploading from url. Default value is 30 seconds --wait=True Wait for upload status --nowait=True Do not wait for upload status
- upload
upload file
usage: ucare upload [-h] [--store | --nostore] [--info | --noinfo] [--cdnurl] filename
- Positional arguments:
filename filename - Options:
--store=False Store uploaded file --nostore=True Do not store uploaded file --info=False Get uploaded file info --noinfo=True Do not get uploaded file info --cdnurl=False Store file and get CDN url.
- create_group
create file group
usage: ucare create_group [-h] paths [paths ...]
- Positional arguments:
paths file paths
- sync
sync files
usage: ucare sync [-h] [--starting_point STARTING_POINT] [--ordering ORDERING] [--limit LIMIT] [--request_limit REQUEST_LIMIT] [--stored {True,False,None}] [--removed {True,False,None}] [--replace] [--uuids UUIDS [UUIDS ...]] [--effects EFFECTS] [path]
- Positional arguments:
path Local path. It can contains special patterns like: ${uuid} ${effects} ${filename} ${ext} Default is ${uuid}${ext} - Options:
--starting_point a starting point for filtering files --ordering specify the way the files should be sorted --limit=100 files to show --request_limit=100 files per request --stored filter stored files
Possible choices: True, False, None
--removed=False filter removed files
Possible choices: True, False, None
--replace=False replace exists files --uuids list of file’s uuids for sync --effects apply effects for synced images.Note that effects will apply to images only.For more information look at: https://uploadcare.com/documentation/cdn/ Example: –effects=resize/200x/-/rotate/90/