Boto Plugin for CloeePy Framework
Project description
# CloeePy-RabbitMQ
Boto Plugin for the CloeePy Framework
Attaches a Boto Session to CloeePy application context.
## Installation
`pip install CloeePy-Boto`
## Configuration
### Configuration Basics
CloeePy-Boto configuration is by environment variables, and text-based
configuration is note supported. All you need to do is ensure
`cloeepy_boto` is listed under `CloeePy.Plugins`
To learn what environment variables to configure, read the
[Boto3 Docs](https://boto3.readthedocs.io/en/latest/guide/configuration.html#guide-configuration)
```
CloeePy
...
Plugins:
cloeepy_boto: {}
```
### Customize Plugin Namespace
By default, your connection is available on the CloeePy application context as
`app.boto`. Optionally you can specify a different namespace by which you access
the rabbitmq connection via `pluginNamespace`.
```
...
Plugins:
cloeepy_boto:
pluginNamespace: customBotoNS
```
Then, you would access your Boto connection on the application context like so:
```
app = CloeePy()
result = app.customBotoNS.ping()
app.log.info(result)
```
## Usage
```
import os
from cloeepy import CloeePy
if __name__ == "__main__":
# Required: set config path as environment variable
os.environ["CLOEEPY_CONFIG_PATH"] = "./example-config.yml"
# instantiate application instance
app = CloeePy()
# create s3 resource and print bucket names
s3 = app.boto.resource('s3')
for bucket in s3.buckets.all():
print(bucket.name)
```
Boto Plugin for the CloeePy Framework
Attaches a Boto Session to CloeePy application context.
## Installation
`pip install CloeePy-Boto`
## Configuration
### Configuration Basics
CloeePy-Boto configuration is by environment variables, and text-based
configuration is note supported. All you need to do is ensure
`cloeepy_boto` is listed under `CloeePy.Plugins`
To learn what environment variables to configure, read the
[Boto3 Docs](https://boto3.readthedocs.io/en/latest/guide/configuration.html#guide-configuration)
```
CloeePy
...
Plugins:
cloeepy_boto: {}
```
### Customize Plugin Namespace
By default, your connection is available on the CloeePy application context as
`app.boto`. Optionally you can specify a different namespace by which you access
the rabbitmq connection via `pluginNamespace`.
```
...
Plugins:
cloeepy_boto:
pluginNamespace: customBotoNS
```
Then, you would access your Boto connection on the application context like so:
```
app = CloeePy()
result = app.customBotoNS.ping()
app.log.info(result)
```
## Usage
```
import os
from cloeepy import CloeePy
if __name__ == "__main__":
# Required: set config path as environment variable
os.environ["CLOEEPY_CONFIG_PATH"] = "./example-config.yml"
# instantiate application instance
app = CloeePy()
# create s3 resource and print bucket names
s3 = app.boto.resource('s3')
for bucket in s3.buckets.all():
print(bucket.name)
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
CloeePy-Boto-0.0.0.tar.gz
(3.4 kB
view details)
File details
Details for the file CloeePy-Boto-0.0.0.tar.gz
.
File metadata
- Download URL: CloeePy-Boto-0.0.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00afc66f5355e3c03c4d69441ca635b7f7364a5c50f0cbe3c7283adbda89e706 |
|
MD5 | ecf7d7c1a3c2bc84a3383e2bd4a2eba6 |
|
BLAKE2b-256 | 1f90f14ceb666278cf53f7b65206e709f6812e2d70712900f7cb06132fc3085a |