mxmader / madeira Goto Github PK
View Code? Open in Web Editor NEWboto3 wrappers for deploying to AWS using native python. "tributary of AWS"...
boto3 wrappers for deploying to AWS using native python. "tributary of AWS"...
the entire package needs them
with a whole lotta mockin' goin' on...
there's no practical reason to make boto3 client objects "private" in the context of python classes in this SDK. only makes exception handling more awkward by propagating warnings regarding access to private properties in linters/IDEs.
requests
packageIn [5]: s3w.does_bucket_exist('foo')
---------------------------------------------------------------------------
ClientError Traceback (most recent call last)
<ipython-input-5-5f39b7a638b4> in <module>
----> 1 s3w.does_bucket_exist('foo')
~/Development/madeira/madeira/s3.py in does_bucket_exist(self, bucket_name)
99 # something else went wrong when checking for the bucket's existence
100 else:
--> 101 raise e
102
103 def get_all_buckets(self):
~/Development/madeira/madeira/s3.py in does_bucket_exist(self, bucket_name)
89 def does_bucket_exist(self, bucket_name):
90 try:
---> 91 self._s3_resource.meta.client.head_bucket(Bucket=bucket_name)
92 return True
93 except botocore.exceptions.ClientError as e:
~/.local/lib/python3.8/site-packages/botocore/client.py in _api_call(self, *args, **kwargs)
355 "%s() only accepts keyword arguments." % py_operation_name)
356 # The "self" in this scope is referring to the BaseClient.
--> 357 return self._make_api_call(operation_name, kwargs)
358
359 _api_call.__name__ = str(py_operation_name)
~/.local/lib/python3.8/site-packages/botocore/client.py in _make_api_call(self, operation_name, api_params)
674 error_code = parsed_response.get("Error", {}).get("Code")
675 error_class = self.exceptions.from_code(error_code)
--> 676 raise error_class(parsed_response, operation_name)
677 else:
678 return parsed_response
ClientError: An error occurred (403) when calling the HeadBucket operation: Forbidden
manage them here instead of disparate copy/paste across various AWS web service projects...
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.