从现在开始我假设你完成了 安装 步骤,开始使用 libstorages管理 你云端的数据。
所有的操作都可以通过 store 对象完成。
>>> import libstorages
>>> store = libstorages.env ( "bcs" )
现在我们可以上传一些数据。
>>> object = store.create_object ( "buket", "hello", "hello, world !!!" )
object 是 Object 的实例。
>>> object = store.create_object_from_file ( "bucket", "hello", \
"/etc/resolve" )
也可以通过文件上传内容。