Skip to main content

python3 fastdfs package

Project description

fdfs-client-py3 Package

1. Installation

pip install fdfs-client-py3==1.0.0

2. Getting Started

upload file

1)upload file by name

from fdfs_client.client import Fdfs_client
client = Fdfs_client('/path/to/fdfs/client.conf')
res = client.upload_by_filename('/path/to/upload_file')

# res:
# {
#   'Status': 'Upload successed.', 
#   'Local file name': '', 
#   'Storage IP': '192.168.19.131', 
#   'Group name': 'group1', 
#   'Remote file_id': 'group1/M00/00/02/wKgTg18Bnz2ASFgeAAAswnVEUA47566649', 
#   'Uploaded size': '11.19KB'
# }

2)upload file by content

from fdfs_client.client import Fdfs_client
client = Fdfs_client('/path/to/fdfs/client.conf')
file = open('/path/to/upload_file')
res = client.upload_by_filename(file.read())

# res:
# {
#   'Status': 'Upload successed.', 
#   'Local file name': '', 
#   'Storage IP': '192.168.19.131', 
#   'Group name': 'group1', 
#   'Remote file_id': 'group1/M00/00/02/wKgTg18Bnz2ASFgeAAAswnVEUA47566649', 
#   'Uploaded size': '11.19KB'
# }

3. Author

the author is smarli,if you has some quesion,you can contact us by email to smartli_it@163.com

Project details


Download files

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

Source Distribution

fdfs-client-py3-1.0.0.tar.gz (20.6 kB view hashes)

Uploaded Source

Built Distribution

fdfs_client_py3-1.0.0-py3-none-any.whl (24.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page