Skip to main content

upload file to nos

Project description

python封装nos上传文件逻辑,支持大文件(>100M)分片上传

安装

pip install nosuplodapi

初始化实例


from uploadapi import UploadClient

# 初始化nos上传实例
uploadClient = UploadClient(access_key="******",
                            secret_key="******",
                            bucket="******",
                            end_point="******")

注: 所需对象存储请到网易云开发者平台申请

上传文件

result = uploadClient.upload(path="******")

返回数据

{
  'url': 'nos下载地址',
  'fileByteSize': 文件大小,
  'md5': '文件md5值',
  'fileName': '源文件名'
}

参考文档


nos python sdk 手册



Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for nosuplodapi, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size nosuplodapi-0.0.2-py2-none-any.whl (3.4 kB) File type Wheel Python version py2 Upload date Hashes View hashes
Filename, size nosuplodapi-0.0.2.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page