No project description provided
Project description
fastdfs-client-python
FastDFS Python client
Manual pass upload test with fastdfs v6.12.1
Motivation
Base on:
Fixes:
- TypeError:
Traceback (most recent call last):
File "~/trying/something/upload.py", line 4, in <module>
client = Fdfs_client(tracker_conf_path)
File "~/trying/something/venv/lib/python3.10/site-packages/fdfs_client/client.py", line 52, in __init__
self.tracker_pool = poolclass(**self.trackers)
TypeError: fdfs_client.connection.ConnectionPool() argument after ** must be a mapping, not str
- ResponseError
fdfs_client.exceptions.ResponseError: [-] Error: Tracker response length is invaild, expect: 40, actual: 70
Requires
- Python3.10+ (No other dependence)
For Python3.8/Python3.9, use https://github.com/waketzheng/fastdfs-client-python/tree/1.0.1
Install
pip install fastdfs-client
Usage
from fastdfs_client import FastdfsClient
client = FastdfsClient('/etc/fdfs/client.conf')
ret = client.upload_by_filename('test.txt')
print(ret)
- Response sample
{
"Group name": "group1",
"Status": "Upload successed.",
"Remote file_id": "group1/M00/00/00/wKjzh0_xaR63RExnAAAaDqbNk5E1398.py",
"Uploaded size": "6.0KB",
"Local file name": "test.py",
"Storage IP": "192.168.243.133"
}
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
fastdfs_client-1.1.0.tar.gz
(34.1 kB
view details)
Built Distribution
File details
Details for the file fastdfs_client-1.1.0.tar.gz
.
File metadata
- Download URL: fastdfs_client-1.1.0.tar.gz
- Upload date:
- Size: 34.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.8 Darwin/20.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 340c41fc3571fe0da254a63c4d62bbd2fa9943c4fb33eff12968524796388da1 |
|
MD5 | e3fb57624c3383c429c3af8f8ec2db4f |
|
BLAKE2b-256 | 098e18cab9263dc636a693c775d29b8b149f1fad9ca06eadfd9ac898898e109f |
File details
Details for the file fastdfs_client-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: fastdfs_client-1.1.0-py3-none-any.whl
- Upload date:
- Size: 36.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.8 Darwin/20.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ceab797b0f0ac210ccfcaa4a9a545386fbf76a0ae31394e5b3a7ae0e6c8818c9 |
|
MD5 | ca7d8c4014c06558ba263a46e04212dc |
|
BLAKE2b-256 | 18b8e449c5e169f957d15c42527d5b7838d296c35ecaf664271688e8edc900a2 |