baidubce / bce-sdk-python Goto Github PK
View Code? Open in Web Editor NEWBCE SDK for Python
License: Apache License 2.0
BCE SDK for Python
License: Apache License 2.0
run "python setup.py install" to install
(.venv) root@411e8a2f:~# pip freeze|grep pycrypto
pycrypto==2.6.1
pycryptodome==3.9.4
pycryptodomex==3.9.4
(.venv) root@411e8a2f:~#
>>> import baidubce
Traceback (most recent call last):
File "<input>", line 1, in <module>
import baidubce
File "/cmdb/.venv/lib/python3.6/site-packages/baidubce/__init__.py", line 18, in <module>
from . import protocol
File "/cmdb/.venv/lib/python3.6/site-packages/baidubce/protocol.py", line 20, in <module>
from .utils import Expando
File "/cmdb/.venv/lib/python3.6/site-packages/baidubce/utils.py", line 32, in <module>
from Crypto.Cipher import AES
File "/cmdb/.venv/lib/python3.6/site-packages/Crypto/Cipher/__init__.py", line 27, in <module>
from Crypto.Cipher._mode_ecb import _create_ecb_cipher
File "/cmdb/.venv/lib/python3.6/site-packages/Crypto/Cipher/_mode_ecb.py", line 29, in <module>
from Crypto.Util._raw_api import (load_pycryptodome_raw_lib,
File "/cmdb/.venv/lib/python3.6/site-packages/Crypto/Util/_raw_api.py", line 33, in <module>
from Crypto.Util.py3compat import byte_string
ImportError: cannot import name 'byte_string'
>>>
I am trying to set a proxy configuration to the bos_client object. Is there a way I could do this?
能否将最新的代码推送上来
sts get_session_token接口一直报The specified bucket does not exist
用node的sdk可以成功
现在的get_object指定的range必须是一个完整闭区间,不支持[offset:EOF]的功能,可否支持此功能
sts_client = StsClient(bos_config)
duration_seconds = 3600
access_dict = {
'service': 'bce:bos',
'region': 'su',
'effect': 'Allow',
'resource': ['bucket'],
'permission': ['WRITE']
}
acl = {'accessControlList': [access_dict]}
response = sts_client.get_session_token(
acl=acl, duration_seconds=duration_seconds)
我用 bce-sdk-js node的demo是成功的,python没返回东西
Here is the simple code when running with python 3.8:
response1 = bts_client.list_instances()
for instance in response1.instances:
response2 = bts_client.list_tables(instance.name)
for table in response2.tables:
print(instance.name, table.name)
Here is the error message:
File "/usr/local/lib/python3.8/site-packages/baidubce/services/bts/bts_client.py", line 205, in list_tables
path = bts.URL_PREFIX + b"/" + instance_name + b"/tables"
TypeError: can't concat str to bytes
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.