Python Streamer: Change Bucket Mid-Script

If you want to switch to a new bucket, because say you've started a new session or run, simply call Streamer.set_bucket(bucket_name='some_bucket_name', bucket_key='some_bucket_key'). Note that bucket_key is optional, if not provided the module will create a uuid4 as the bucket_key. Here is an example:

streamer = Streamer(bucket_name="Starting Bucket", access_key="YourAccessKey")

streamer.log("signal1", "starting")
streamer.set_bucket(bucket_name="New Bucket")
streamer.log("signal1", "starting")

In this example, you will get a signal1=starting in two different buckets: "Starting Bucket" and "New Bucket".

Feedback and Knowledge Base