python filesystem sdk
Project description
filesystem-pysdk
python filesystem sdk: filesystem project
I. Brief
a python client for filesystem.
support user, bucket, file manager.
II. Quick tutorial
1. create a client
import filesystem_pysdk
client, err = filesystem_pysdk.new_client("user", "auth", "api_host", "web_host")
2. user manager
- create a user
import filesystem_pysdk
client.add_user(filesystem_pysdk.User("user1"))
- delete a user
client.delete_user("user1")
3. bucket manager
- create a new bucket
import filesystem_pysdk
client.add_bucket(filesystem_pysdk.Bucket(name="bucket1"))
- delete a bucket
client.delete_user(name="bucket1")
4. file manager
- upload file
import filesystem_pysdk
with open("client.py", "rb") as f:
client.upload_file(filesystem_pysdk.File("bucket1", "test/client.py", 0),
f)
- download file
import filesystem_pysdk
res = client.download_file(filesystem_pysdk.File("bucket1", "test/client.py"))
with open("client_download.py", "wb") as f:
f.write(res)
- file move
import filesystem_pysdk
client.move_file(filesystem_pysdk.File("bucket1", "test/a.py"),
filesystem_pysdk.File("bucket1", "test/b.py"))
- file copy
import filesystem_pysdk
client.move_file(filesystem_pysdk.File("bucket1", "test/a.py"),
filesystem_pysdk.File("bucket1", "test/b.py"))
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
filesystem_pysdk-0.0.1.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for filesystem_pysdk-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01bd7d70518e68718718803363dd3fbb19e3356c4f967a1bb3dda33e285fce04 |
|
MD5 | 0576d75489a2296e902da50a8f214d87 |
|
BLAKE2b-256 | 42c043ff07f687b4f9978528b3d63bea97aa1bd9acf6291be23b4469e55a9465 |