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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for fdfs_client_py3-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 520f03a715c7344f26b59720793421d4b1208f1ea5c0c767db22b929b91187a4 |
|
MD5 | daf9f8babd02d4f11feb79771825f826 |
|
BLAKE2b-256 | a2a99ada38ff78d1e45394e0b409904d65a2a11d43f4ae33d40cf553bc46470f |