Skip to main content

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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

heartbeat_sh-0.3.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file heartbeat-sh-0.3.0.tar.gz.

File metadata

  • Download URL: heartbeat-sh-0.3.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for heartbeat-sh-0.3.0.tar.gz
Algorithm Hash digest
SHA256 babb2ff4c283c77002d0da82c464b341b12b443a774248c55d4795e31213dff4
MD5 8a139e6125ddaf8d7289de7c143b3fc4
BLAKE2b-256 cbefa27313b18a050426280c61e72404b41c9fc5b5008d59afbb6cb9b93a721f

See more details on using hashes here.

File details

Details for the file heartbeat_sh-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: heartbeat_sh-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for heartbeat_sh-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e016382c0dce60e6015ce60922076c2260f86d97475254570f20774d22fedc7
MD5 f64e0ab546a3f064c7ca42898ae34402
BLAKE2b-256 6d04adcefb4cc0fb16694f5dfd91112d22e5862e9fea2c37f6cd2b7c140bbe6c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page