Module xboto.resource
You can import any resource boto supports from this module and use it as if that's the current, thread-safe resource.
There are type-hints on the module for common resources we use, but you can import anything boto supports.
If you import something boto does not support, you'll get an error only when you first attempt to use the imported resource/client.
# Simply import and use it as-if it's a ready-to-go resource.
# (you can use `xboto.client` for clients)
from xboto.resource import dynamodb
# You can use it just like the normal boto3 dynamodb resource.
# Every time you use it, it will lazily lookup the current one for the current thread.
table_resource = dynamodb.Table(name)
If you have an aws resource that uses a - for it's name, you can use an _ (underscore)
instead.
All underscores are changed to a - when looking up the aws resource.
You can also directly use the xboto.dependencies.BotoResources.load method, and use a - there.