fastdfs-client
FastDFS Python client
Manual pass upload test with fastdfs v6.12.1
English | 中文
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+
- anyio
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.txt",
"Uploaded size": "6.0KB",
"Local file name": "test.txt",
"Storage IP": "192.168.243.133"
}
Advance
- Upload as URL
from pathlib import Path
p = Path("test.txt")
client = FastdfsClient(["dfs.waketzheng.top"])
url = client.upload_as_url(p.read_bytes(), p.suffix)
print(url)
# https://dfs.waketzheng.top/group1/M00/00/00/wKjzh0_xaR63RExnAAAaDqbNk5E1398.txt
- Download
save_to = "local.txt"
client.download_to_file(save_to, "group1/M00/00/00/wKjzh0_xaR63RExnAAAaDqbNk5E1398.txt")
- Delete
id_or_url = (
"https://dfs.waketzheng.top/group1/M00/00/00/wKjzh0_xaR63RExnAAAaDqbNk5E1398.txt"
)
# id_or_url = 'group1/M00/00/00/wKjzh0_xaR63RExnAAAaDqbNk5E1398.txt'
client.delete_file(id_or_url)
AsyncIO/Trio
- upload
from pathlib import Path
from fastdfs_client import FastdfsClient
client = FastdfsClient(["dfs.waketzheng.top"])
p = Path("tests/test_async_client.py")
url = await client.upload(p.read_bytes(), p.suffix)
print(url)
# https://dfs.waketzheng.top/group1/M00/00/00/xxx.py
- delete
url = "https://dfs.waketzheng.top/group1/M00/00/00/xxx.py"
resp = await client.delete(url)
print(resp)
# ('Delete file successed.', b'group1/M00/00/1B/eE0vIWaU9kyAVILJAAHM-px7j44359.py', b'120.77.47.33')
Metadata
Release files for fastdfs-client 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fastdfs_client-1.3.0.tar.gz | 37.2 kB | With provenance | Details for fastdfs_client-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fastdfs_client-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for fastdfs_client-1.3.0-py3-none-any.whl |
Total release size: 76.5 kB
Release files / fastdfs_client-1.3.0.tar.gz
| Download URL | fastdfs_client-1.3.0.tar.gz |
|---|---|
| Size | 37.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
35ac6e5c0323573088b5b22472c1b327082ccf1f513aa74dff04c4fa87a614e3
|
|
BLAKE2b-256 checksum How to use checksums |
d9cef5ee23c32ae676fc6a24a8d586957da01013f602754298fabeaba3d7c1dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency logRelease files / fastdfs_client-1.3.0-py3-none-any.whl
| Download URL | fastdfs_client-1.3.0-py3-none-any.whl |
|---|---|
| Size | 39.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
469629f142992e4a059d35d6c9e0ef7996e5e69868fb83722eb12c2f06ac9a4b
|
|
BLAKE2b-256 checksum How to use checksums |
e6854b3cbefff6c16d4a56257c76c43ebe4d7011c7d5655a1c84ba41d9de29dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency logSecurity for fastdfs-client 1.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for fastdfs_client-1.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.