A client library for heartbeat.sh
Project description
Heartbeat.sh Python Client
This is a Python client library for heartbeat.sh.
Quick start
Install with pip install heartbeat-sh requests
from datetime import timedelta
from heartbeat_sh import HeartbeatClient
HeartbeatClient("example").send_beat(
"example:python",
timedelta(days=1, hours=2),
timedelta(days=2)
)
Use a custom requests library (Dependency Injection)
By default, this module uses the requests
library to make HTTP
requests. This is not a requirement. You may inject any request library:
from datetime import timedelta
from heartbeat_sh import HeartbeatClient
def request(url: str, method: str):
return {
"fake": "json result"
}
HeartbeatClient(
subdomain="example",
request=request,
).send_beat(
"example:python",
timedelta(days=1, hours=2),
timedelta(days=2)
)
Links
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
heartbeat-sh-0.3.0.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for heartbeat_sh-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e016382c0dce60e6015ce60922076c2260f86d97475254570f20774d22fedc7 |
|
MD5 | f64e0ab546a3f064c7ca42898ae34402 |
|
BLAKE2b-256 | 6d04adcefb4cc0fb16694f5dfd91112d22e5862e9fea2c37f6cd2b7c140bbe6c |