The official Python SDK for Task Badger
Project description
Task Badger Python Client
This is the official Python SDK for Task Badger
Getting Started
Install
pip install --upgrade taskbadger
Configuration
import taskbadger
taskbadger.init(
organization_slug="my-org",
project_slug="my-project",
token="***"
)
Usage
from taskbadger import Task, Action, EmailIntegration
# create a new task with custom data and an action definition
task = Task.create(
"task name",
data={
"custom": "data"
},
actions=[
Action(
"*/10%,success,error",
integration=EmailIntegration(to="me@example.com")
)
]
)
# update the task status to 'processing'
task.start()
try:
for i in range(100):
do_something(i)
if i % 10 == 0:
# update the progress of the task
task.update_progress(i)
except Exception as e:
# record task errors
task.error(data={
"error": str(e)
})
raise
# record task success
task.success()
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
taskbadger-0.1.tar.gz
(18.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
taskbadger-0.1-py3-none-any.whl
(41.0 kB
view details)
File details
Details for the file taskbadger-0.1.tar.gz.
File metadata
- Download URL: taskbadger-0.1.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.9.5 Linux/5.4.0-137-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffa26c538beb807409be1133b558273fc7b55e03ba6143a7a591aaf67bbd696b
|
|
| MD5 |
4eca8d6c2910fd11701f4f948c1cee96
|
|
| BLAKE2b-256 |
bdf19357b142fe06976605801b118e8e7904dc919a86cc64ae1aecd452c89104
|
File details
Details for the file taskbadger-0.1-py3-none-any.whl.
File metadata
- Download URL: taskbadger-0.1-py3-none-any.whl
- Upload date:
- Size: 41.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.9.5 Linux/5.4.0-137-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b92f5198fb37663fcdf8a1fc5f9be533b82d515283bc732ca2aad257eab74401
|
|
| MD5 |
a67fb766b856d654d754970ae63c3968
|
|
| BLAKE2b-256 |
90a4568a26647d39c802427e2868456635a40bb7c1454cdd24fd4af7aaa7a4e5
|