Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion awsimple/pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def publish(self, message: dict) -> None:
@typechecked()
def get_messages(self) -> List[Dict[str, Any]]:
"""
Get all available messages. Muse set sub_poll=True when creating the PubSub object to use this function.
Get all available messages. Use set sub_poll=True when creating the PubSub object to use this function.

:return: list of messages as dictionaries
"""
Expand Down
Binary file added doc/awsimple_pubsub_sf_python_1_26.pdf
Binary file not shown.
Binary file added doc/awsimple_pubsub_sf_python_1_26.pptx
Binary file not shown.
Empty file removed doc/flake8_report.txt
Empty file.
2 changes: 1 addition & 1 deletion examples/make_venv.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
rmdir /S /Q venv
c:"\Program Files\Python39\python.exe" -m venv --clear venv
c:"\Program Files\Python314\python.exe" -m venv --clear venv
venv\Scripts\python.exe -m pip install --upgrade pip
venv\Scripts\pip3 install -U setuptools
venv\Scripts\pip3 install -U -r requirements-examples.txt
7 changes: 7 additions & 0 deletions examples/pubsub/pub_app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from awsimple import Pub

pub = Pub("awsimple_pubsub_example")
pub.start()
while input_message := input(f"Message to publish (or Enter to exit):").strip():
pub.publish({"message": input_message})
pub.request_exit()
2 changes: 2 additions & 0 deletions examples/pubsub/pubsub.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
start "pub" ..\venv\Scripts\python.exe pub_app.py
start "sub" ..\venv\Scripts\python.exe sub_app.py
6 changes: 6 additions & 0 deletions examples/pubsub/sub_app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from awsimple import Sub

sub = Sub("awsimple_pubsub_example", sub_callback=print)
sub.start()
input("Press Enter to exit...\n")
sub.request_exit()