Skip to main content

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

Metadata

Release files for heartbeat-sh 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for heartbeat-sh 0.3.0
File Size Uploaded
heartbeat-sh-0.3.0.tar.gz 2.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for heartbeat-sh 0.3.0
File Interpreter ABI Platform
heartbeat_sh-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.2 kB

Release files / heartbeat-sh-0.3.0.tar.gz

Download URL heartbeat-sh-0.3.0.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
babb2ff4c283c77002d0da82c464b341b12b443a774248c55d4795e31213dff4
BLAKE2b-256 checksum
How to use checksums
cbefa27313b18a050426280c61e72404b41c9fc5b5008d59afbb6cb9b93a721f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.1 CPython/3.6.5

Release files / heartbeat_sh-0.3.0-py3-none-any.whl

Download URL heartbeat_sh-0.3.0-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e016382c0dce60e6015ce60922076c2260f86d97475254570f20774d22fedc7
BLAKE2b-256 checksum
How to use checksums
6d04adcefb4cc0fb16694f5dfd91112d22e5862e9fea2c37f6cd2b7c140bbe6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.1 CPython/3.6.5

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page