Longleding Static File Service SDK
Project description
Longleding Static File Service SDK
Supported Python Versions
Python >= 3.6
Installation
longleding-static-file-service-sdk is available for Linux, macOS, and Windows.
$ pip install longleding-static-file-service-sdk
Basic Usage
# -*- coding: utf-8 -*-
import static_file_service
static_file_service_endpoint = "localhost:80"
static_file_service.init_service(endpoint=static_file_service_endpoint)
if __name__ == '__main__':
test_bytes = b'test file'
print(static_file_service.get_oss_bucket_info())
print(static_file_service.get_upload_credentials())
static_file_service.put_file('upload/t.txt', test_bytes)
print(static_file_service.get_file('upload/t.txt'))
print(static_file_service.get_file_md5('upload/t.txt'))
static_file_service.copy_file('upload/t.txt', 'upload/t1.txt')
print(static_file_service.get_file_md5('upload/t1.txt'))
static_file_service.move_file('upload/t.txt', 'upload/t2.txt')
print(static_file_service.get_file_md5('upload/t2.txt'))
Troubleshoot
If you encounter error messages similar to the following:
...
TypeError: Couldn't build proto file into descriptor pool!
Invalid proto descriptor for file "common.proto":
common.proto: A file with this name is already in the pool.
Setting an environment variable the following before running:
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION='python'
See also
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
Built Distribution
Close
Hashes for longleding-static-file-service-sdk-0.2.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f3d416a277ceb990df2a34e30152c2c1af126275b008be41395bedb938b69f2 |
|
MD5 | 51149859f8c52bb671938e50bf00d1f9 |
|
BLAKE2b-256 | da4b3bb28ea1cb801dab9b63f1a1d261e4408f29968e410f67cf18cebe3f5b7b |
Close
Hashes for longleding_static_file_service_sdk-0.2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8601c9f10cb661c45be3f8daf3599d427b965ed11f0b0f8729394a8f038e306 |
|
MD5 | eeb38f95f6c7a90acf6add831977eb4a |
|
BLAKE2b-256 | a349b5fad1ce8adb12c6276577a08e7d6cb3f8ca46875869ef066ff542303104 |