Skip to content

Commit

Permalink
Merge pull request #2 from digitalfortress-dev/docs/update-readme
Browse files Browse the repository at this point in the history
docs: update README.md
  • Loading branch information
haihuynhDF authored Dec 6, 2023
2 parents c21f7f9 + a90365d commit 771a11f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,37 @@

# Git Repository Template

## Usage
## Getting Started

Install package
```
```commandline
pip install sqs-client
```

## Example


```python
from sqs_client.client import SQSClient

sqs_client = SQSClient()


# Subscribe to an SQS
@sqs_client.task(
queue_name="sqs-queue-name",
lazy=True,
wait_time_seconds=0,
visibility_timeout=300,
)
def test_task(message):
print("test_task received:", message)


# Publish a message
test_task.trigger("Test message")
```

## License

This project is Copyright (c) 2023 and onwards Digital Fortress. It is free software and may be redistributed under the terms specified in the [LICENSE] file.
Expand Down
2 changes: 2 additions & 0 deletions examples/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
sqs_client = SQSClient()


# Subscribe to a SQS
@sqs_client.task(
queue_name="sqs-queue-name",
lazy=True,
Expand All @@ -13,4 +14,5 @@ def test_task(message):
print("test_task received:", message)


# Publish a message
test_task.trigger("Test message")

0 comments on commit 771a11f

Please sign in to comment.