Python client 示例

jsonstring(body)_request.headers['Content-MD5']=OpensearchUtil.get_content_md5(req_body)_request.body=req_body if not UtilClient.is_unset(security_token):_request.headers["X-Opensearch-Security-Token"]=security_token_...

Python client 示例

jsonstring(body)_request.headers['Content-MD5']=OpensearchUtil.get_content_md5(req_body)_request.body=req_body if not UtilClient.is_unset(security_token):_request.headers["X-Opensearch-Security-Token"]=security_token_...

Python 3 UDTF

list,生成dict"""def_init_(self):import json cache_file=get_cache_file('test_json.txt')self.my_dict=json.load(cache_file)cache_file.close()records=list(get_cache_table('table_resource1'))for record in records:self.my_dict...

Python 2 UDTF

生成dict"""def_init_(self):import json cache_file=get_cache_file('test_json.txt')self.my_dict=json.load(cache_file)cache_file.close()records=list(get_cache_table('table_resource1'))for record in records:self.my_dict[record...

Python 3 UDTF读取MaxCompute资源示例

list,生成dict"""def_init_(self):import json cache_file=get_cache_file('test_json.txt')self.my_dict=json.load(cache_file)cache_file.close()records=list(get_cache_table('table_resource1'))for record in records:self.my_dict...

UDF开发(Python3)

from odps.udf import annotate from odps.distcache import get_cache_file@annotate('bigint->string')class DistCacheExample(object):def_init_(self):cache_file=get_cache_file('test_distcache.txt')kv={} for line in cache_file:...

使用KMS主密钥在线加密和解密数据

file):file=open(in_file,'r')content=file.read()file.close()return content def WriteTextFile(out_file,content):file=open(out_file,'w')file.write(content)file.close()clt=client.AcsClient(os.getenv("ALIBABA_CLOUD_ACCESS_KEY_...

alicloud_oss_bucket_object

Provides a resource to put a object(content or file)to a oss bucket.Example Usage Uploading a file to a bucket resource"random_integer""default"{ max=99999 min=10000 } resource"alicloud_oss_bucket""default"{ bucket=...

合约链错误码

VM_GET_STORAGE_FAILED 10302 vm get storage fail 虚拟机获取存储失败 VM_TRANSFER_BALANCE_FAILED 10303 vm transfer balance fail 虚拟机转账失败 VM_GET_CODE_FAILED 10304 vm get code fail 虚拟机获取代码失败 VM_GET_BLOCKHASH_...

使用PyJindo访问阿里云OSS-HDFS

fs.rename(file_path,file_path2)#列出文件。mv_file=fs.listdir(sub_dir)print("移动后的目录文件为%s."%(mv_file))#删除测试文件,重新列出文件。fs.remove(file_path2)de_file=fs.listdir(sub_dir)print("删除文件后的pyjindotest目录下...

示例一:MQTT多文件上传

uint64_t crc=mqtt_upload_get_file_crc64(MQTT_UPLOAD_FILE_NAME);步骤四:请求上传文件 调用 aiot_mqtt_upload_open_stream,向物联网平台发起上传文件请求。重要 同名文件上传过程中,请勿调用aiot_mqtt_upload_open_stream发起多次请求...

Batch-批量调用API

link/update(修改分享)/share_link/cancel(取消分享)/share_link/list(列举分享)/share_link/get(获取分享信息)/share_link/get_share_token(获取分享令牌)/async_task/get(获取异步任务信息)/file/get body object 否 ...

客户端加密

result=bucket.get_object(multi_key)content_got=b'' for chunk in result:content_got+chunk assert content_got[0:102400]=part_a assert content_got[102400:204800]=part_b assert content_got[204800:307200]=part_c 断点续传上传 ...

Fetch API

Fetch API是一种从边缘节点获取数据的方法。...它类似于浏览器环境中的Fetch API,...由于ER不支持读写文件,为了满足标准,您可以使用这两个类,如果使用这两个类提供给回复的body,content-type 是 Blob 和 File 设置的mime type,和标准一致。

Fetch API

Fetch API是一种从边缘节点获取数据的方法。...它类似于浏览器环境中的Fetch API,...由于ER不支持读写文件,为了满足标准,您可以使用这两个类,如果使用这两个类提供给回复的body,content-type 是 Blob 和 File 设置的mime type,和标准一致。

Fetch API

Fetch API是一种从边缘节点获取数据的方法。...它类似于浏览器环境中的Fetch API,...由于ER不支持读写文件,为了满足标准,您可以使用这两个类,如果使用这两个类提供给回复的body,content-type 是 Blob 和 File 设置的mime type,和标准一致。

ListDefaultCollectorConfigurations

content String-key:log title:Log file content description:>Contains log file lines.fields:.配置文件内容。fileName String fields.yml 配置文件名称。示例 请求示例 GET/openapi/beats/default-configurations?resVersion=6.8.5_with...

文档AI助手插件

x-oss-process url 逻辑,需要调用封装的服务端接口*/let opt={ content_type,/content_md5,file_name:"test-object.docx",};let { ai_process_url }=await$.post("/file/get_ai_process_url",opt);return { ai_process_url,/必选/content_...

文档管理

password,collection=collection,file_name=file_name,metadata=metadata,chunk_overlap=chunk_overlap,chunk_size=chunk_size,document_loader_name=document_loader_name,file_url_object=io.BytesIO(file_content_bytes),text_splitter_...

使用函数计算实现自动解压上传到OSS的ZIP文件

end))def get_content_bytes(self,begin,end):reader=self.get_reader(begin,end)return reader.read()def get_last_content_bytes(self,offset):return self.get_content_bytes(self.filesize-offset,self.filesize-1)ossZipfile.py 文件 ...

Word

word_file_path=r"D:\2_测试文件归档\测试Word.docx"word=rpa.app.wps.word.open(word_file_path,visible=True)word_name=word.file_name()get_table get_table(index)方法描述 根据索引获取表格 参数说明 index表格索引 返回值说明 返回...

建一个包含自定义算子的任务

ns+int(frame.time*1000000000)content=FileContent()content.file_tag=file_tag content.file_path=file_path if len(file_list)>=MAX_RECORD_NUM:self.save_data_partition(file_list)file_list=[]else:file_list.append(json.dumps...

Word

word_file_path=r"D:\2_测试文件归档\测试Word.docx"word=rpa.app.microsoft.word.open(word_file_path,visible=True)pdf_path=r"D:\2_测试文件归档\word文档.pdf"word.to_pdf(pdf_path)get_table_content_by_keys get_table_content_by_...

快速开始

file_name=PurePosixPath(unquote(urlparse(result.url).path)).parts[-1]with open('./s'%file_name,'wb+')as f:f.write(requests.get(result.url).content)else:print('Failed,status_code:%s,code:%s,message:%s'%(rsp.status_code,rsp....

快速开始

file_name=PurePosixPath(unquote(urlparse(result.url).path)).parts[-1]with open('./s'%file_name,'wb+')as f:f.write(requests.get(result.url).content)else:print('Failed,status_code:%s,code:%s,message:%s'%(rsp.status_code,rsp....

使用KMS信封加密在本地加密和解密数据

file,content):file=open(out_file,'w')file.write(content)file.close()def LocalDecrypt(datakey,iv,ciphertext,tag,out_file):cipher=AES.new(datakey,AES.MODE_EAX,iv)data=cipher.decrypt_and_verify(ciphertext,tag).decode('utf-8')...

UDF示例:Python UDF使用第三方包

coding:utf-8 from odps.udf import annotate from odps.distcache import get_cache_file def include_file(file_name):import os,sys so_file=get_cache_file(file_name,'b')with open(so_file.name,'rb')as fp:content=fp.read()so=open...

数据校验

with open('/Users/test/Desktop/demo.txt','rb')as file:content=file.read()#根据实际内容计算上传内容对应的MD5。content_md5=oss2.utils.content_md5(content);print('content_md5',content_md5)#上传请求中携带'Content-MD5'的header...

RESTful API

if("audio/mpeg".equals(contentType)){ File f=new File(audioSaveFile);FileOutputStream fout=new FileOutputStream(f);fout.write(response.body().bytes());fout.close();System.out.println("The GET request succeed!} else {/...

前言

oss_request_options_t oss_get_object_to_buffer oss_get_object_to_file oss_get_object_to_buffer_by_url oss_get_object_to_file_by_url oss_init_multipart_upload oss_complete_multipart_upload 对于 0.0.X系列SDK:不兼容。...

AccessKey调接口接入

domain/$domainid/drive/$driveid GetFile(/v2/file/get)pds:GetFile acs:pds:$regionid:$accountid:domain/$domainid/drive/$driveid DownloadFile(/v2/file/get)pds:GetFile acs:pds:$regionid:$accountid:domain/$domainid/drive/$...

请求结构

使用GET方式向API提交查询,且设置了召回数据格式为XML格式时,可以根据返回的content-type 中定义的格式来解析召回的数据,例如查询返回内容格式为“application/xml”,则本地程序需通过XML格式解析数据。签名参数 每个操作都需在 HTTP ...

分片上传

} int64_t get_file_size(const char*file_path){ int64_t filesize=-1;struct stat statbuff;if(stat(file_path,&statbuff)){ return filesize;} else { filesize=statbuff.st_size;} return filesize;} int main(int argc,char*argv[]){/...

在ASM中通过EnvoyFilter添加HTTP响应头

elseif response_handle:headers():get("Content-Security-Policy")then if not hasFrameAncestors(response_handle)then csp=response_handle:headers():get("Content-Security-Policy");csp=csp.;frame-ancestors none;response_handle:...

在ASM中通过EnvoyFilter添加HTTP响应头

elseif response_handle:headers():get("Content-Security-Policy")then if not hasFrameAncestors(response_handle)then csp=response_handle:headers():get("Content-Security-Policy");csp=csp.;frame-ancestors none;response_handle:...

请求一个JS文件并返回

代码/*示例为请求https://demo.aliyundoc.com/alipay/qrcode/1.0.3/qrcode.js并返给客户端*测试时请将someHost和url替换为您自己的地址*/const someHost="...response){ const headers=response.headers const contentType=headers.get("content...

请求一个JS文件并返回

代码/*示例为请求https://demo.aliyundoc.com/alipay/qrcode/1.0.3/qrcode.js并返给客户端*测试时请将someHost和url替换为您自己的地址*/const someHost="...response){ const headers=response.headers const contentType=headers.get("content...

特定格式文本数据加工

json",depth=1,fmt='full')展开的日志为:content_json.data-1.data-1:{"aaa":"Mozilla","bbb":"asde"} content_json.data-2.data-2:{"up_adde":"-","up_host":"-"} content_json.referer:content_json.request:GET/phpMyAdmin content_...

Java SDK

String contentType=headers.get("content-type")=null?(String)headers.get("content-type");String date=headers.get("date")=null?null":(String)headers.get("date");String header=method+""+contentMD5+""+contentType+""+date+...

分片上传

} } } } PHP <?php if (is_file(_DIR_.'/./autoload.php')){ require_once_DIR_.'/./autoload.php';} if(is_file(_DIR_.'/./vendor/autoload.php')){ require_once_DIR_.'/./vendor/autoload.php';} use OSS\Credentials\...
共有200条 < 1 2 3 4 ... 200 >
跳转至: GO
产品推荐
云服务器 安全管家服务 安全中心
这些文档可能帮助您
文件存储 CPFS 内容安全 文件存储HDFS版 数据库文件存储 弹性公网IP 短信服务
新人特惠 爆款特惠 最新活动 免费试用