mtingers / backblaze-b2 Goto Github PK
View Code? Open in Web Editor NEWPython module for accessing the Backblaze B2 API
License: MIT License
Python module for accessing the Backblaze B2 API
License: MIT License
Hi,
When I call delete_file_version(file_name,file_id) an error is thrown:
file_info = b2_client.get_file_info_by_name(file_name=file_name, bucket_name=my_bucket)
response = b2_client.delete_file_version(file_name=file_info['fileName'], file_id=file_info['fileId'])
print response
The error:
File "/home/shmuel/workspace/***/***/my_script.py", line 135, in foo
client.remove_file(location)
File "/home/shmuel/workspace/***/***/b2/B2Client.py", line 29, in remove_file
response = b2_client.delete_file_version(file_name=file_info['fileName'], file_id=file_info['fileId'])
File "/usr/local/lib/python2.7/dist-packages/backblazeb2/backblazeb2.py", line 357, in delete_file_version
bucket = self.get_bucket_info(bucket_id=bucket_id,
NameError: global name 'bucket_id' is not defined
Seems like bucket details are not passed to this function.
I think I can fix that, but in the meantime I'm opening this issue.
B2 supports a "large files" upload feature to allow uploading files larger than 5GB and/or splitting large files into parts for faster multi-threaded upload: https://www.backblaze.com/b2/docs/large_files.html
Starting a conversion myself, will fork unless you guys get to it sooner.
At present, the list_filr_versions returns first 100 files I tried the following thing to get more files in single call
def list_file_versions(self, bucket_id=None, bucket_name=None, max_file_account=None): bucket = self.get_bucket_info(bucket_id=bucket_id, bucket_name=bucket_name) self._authorize_account() return self._api_request( '%s/b2api/v1/b2_list_file_versions' % self.api_url, {'bucketId': bucket['bucketId'], 'maxFileCount': max_file_account}, {'Authorization': self.authorization_token})
When passing the following command:
file_names = b2.list_file_versions(bucket_name='abc', max_file_account='20')
It returns the error HTTP Error 400: Bad request. I was wondering if there a way to pass more parameters it the Http message body?
As with amazon AWS libs.
Cool library by the way.
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.