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 Justfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set quiet := true
set quiet

# Show all recipes
help:
Expand Down
7 changes: 6 additions & 1 deletion docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,10 @@ client.send("Your message here", tags=["tag1", "tag2"])
```python
client = NtfyClient(topic="Your topic")

client.send("Your message here", actions=[client.ViewAction(label="Open Website", url="https://ntfy.sh"),])
client.send(
"Your message here",
actions=[
client.ViewAction(label="Open Website", url="https://ntfy.sh"),
],
)
```
7 changes: 5 additions & 2 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ from python_ntfy import NtfyClient
client = NtfyClient(topic="Your topic")

# With credentials passed to the `NtfyClient` constructor (takes precedence over environment variables)
client = NtfyClient(topic="Your topic", auth=("your_username", "your_password")) # Basic auth
client = NtfyClient(topic="Your topic", auth="your_token") # Token auth
client = NtfyClient(
topic="Your topic", auth=("your_username", "your_password")
) # Basic auth
client = NtfyClient(topic="Your topic", auth="your_token") # Token auth

# Or set credentials from environment variables
from os import environ

environ["NTFY_USER"] = "your_username"
environ["NTFY_PASSWORD"] = "your_password"
environ["NTFY_TOKEN"] = "your_token"
Expand Down
Loading
Loading