C14 Python包装器
项目描述
此模块是围绕Online.net C14 存储解决方案的Python包装器。
此模块实现了Online.net API提供的所有公开调用。
用法
from c14 import C14
token = 'thisismyprivatetoken'
c14api = C14(token)
# Create a safe
c14api.create_safe('My Safe', 'This is the description of my safe')
# List all safes
c14api.list_safes()
可用方法列表
def list_platforms(self): 获取平台链接列表。
def get_platform(self, id): 获取有关平台的详细信息。
id: 平台ID。
def list_protocols(self): 获取可用的文件传输协议列表。
def create_safe(self, name, description=None): 创建一个安全存储。
name: 安全存储名称。
description: 安全存储描述。
def get_safe(self, uuid): 获取有关安全存储的详细信息。
uuid: 安全存储ID。
def update_safe(self, uuid, name=None, description=None): 编辑安全存储。
uuid: 安全存储ID。
name: 安全存储名称。
description: 安全存储描述。
def list_safes(self): 获取用户安全存储链接列表。
def delete_safe(self, uuid): 删除安全存储。
uuid: 安全存储ID。
def create_archive(self, safe_id, name, description, protocols, platforms, parity=None, ssh_keys=None, days=None): 创建存档。
safe_id: 安全存储ID。
name: 存档名称。
description: 存档描述。
protocols: 使用的文件传输协议。
平台:存储归档的平台ID。
奇偶校验:奇偶校验(标准版或企业版;默认:标准版)。
ssh_keys:SSH密钥的UUID。
days:文件自动归档前的天数(2、5或7;默认:7)。
def get_archive(self, safe_id, uuid):获取归档信息。
safe_id: 安全存储ID。
uuid:归档ID。
def update_archive(self, uuid, name=None, description=None):编辑归档。
safe_id: 安全存储ID。
uuid:归档ID。
name: 存档名称。
description: 存档描述。
def list_archives(self, safe_id):获取用户保险箱中的归档列表。
safe_id: 安全存储ID。
def delete_archive(self, safe_id, uuid):删除归档。
safe_id: 安全存储ID。
uuid:归档ID。
def archive_archive(self, safe_id, uuid):从临时存储中归档文件。
safe_id: 安全存储ID。
uuid:归档ID。
def archive_informations(self, safe_id, uuid):获取归档临时存储的信息。
safe_id: 安全存储ID。
uuid:归档ID。
def archive_list_jobs(self, safe_id, uuid):获取归档作业列表。
safe_id: 安全存储ID。
uuid:归档的ID。
def archive_get_job(self, safe_id, uuid, job_id):获取作业信息。
safe_id: 安全存储ID。
uuid:归档的ID。
job_id:作业ID。
def archive_get_encryption_key(self, safe_id, uuid):获取归档的加密密钥。
safe_id: 安全存储ID。
uuid:归档ID。
def archive_set_encryption_key(self, safe_id, uuid, key):设置归档的加密密钥。
safe_id: 安全存储ID。
uuid:归档ID。
key:加密密钥。
def archive_delete_encryption_key(self, safe_id, uuid):删除归档的加密密钥。
safe_id: 安全存储ID。
uuid:归档ID。
def archive_list_locations(self, safe_id, uuid):获取用户归档上的位置列表。
safe_id: 安全存储ID。
uuid:归档ID。
def archive_get_location(self, safe_id, uuid, location_id):获取归档位置的信息。
safe_id: 安全存储ID。
uuid:归档ID。
def verify_archive(self, safe_id, uuid, location_id):验证归档位置上的文件。
safe_id: 安全存储ID。
uuid:归档ID。
location_id:位置ID。
def unarchive(self, safe_id, uuid, location_id, protocols, rearchive=None, key=None, ssh_keys=None):将文件从临时存储中解压缩。
safe_id: 安全存储ID。
uuid:归档ID。
location_id:位置ID。
protocols: 使用的文件传输协议。
rearchive:7天后重新归档数据(默认:true)。
key:加密密钥。
ssh_keys:SSH密钥的UUID。
项目详情
c14-jpic-0.0.2.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 5eff6f6effddbab7566045908ec575ae1b7a2cc027dc45b7f34e716b5f3e2585 |
|
MD5 | 97963856024159a6b68377b2f78120f0 |
|
BLAKE2b-256 | 906c2ff738d5091590767348d503a7cb0800b6ca3c3c9e6245187114bc7902ca |