Skip to main content

py-sentry contains the python package that provides a foundation for a micro-service that can either be run once or at a regular interval.

This document outlines how this project can be used. The purpose of this project is described elsewhere, as are the details

Foundational Elements

The IntervalService

A standard py_sentry executable take the following as demonstrated by the command_service.py example:

"""
This shows how to create an executeable to run a Task using the
sentry.service module.
"""

from sentry import IntervalService


def main() -> int:
    """
    Runs the command_task as a sentry.
    """
    service = IntervalService("command_task")
    return service.run()


if __name__ == "__main__":
    main()

The IntervalService is designed to execute a named Task. The task itself is declared as a Python entry point. When using a pyproject.toml file for packaging the task can be declared as follows:

[project.entry-points.sentry]
command_task = "sentry.command_task:CommandTask"

A Task

A Task is a python class that provide the implementation the behaviour of a micro-service as managed by an IntervalService. The complete information about how a Task does this is provided elsewhere

The main concept is that a minimal task must implement the following function:

def __init__(self) -> None:
    """
    Creates an instance of this class.
    """

and in most other cases, also implement this other function:

def execute(self) -> None:
    """
    Executes the responsibilities of this executable
    """

Metadata

Release files for py-sentry 1.6.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 py-sentry 1.6.0
File Size Uploaded Provenance
py_sentry-1.6.0.tar.gz 12.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for py-sentry 1.6.0
File Interpreter ABI Platform
py_sentry-1.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 30.7 kB

Release files / py_sentry-1.6.0.tar.gz

Download URL py_sentry-1.6.0.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2b9a759f581c7490678ae409a299968cd1e4c56c17ed02893d01f9bca7fd8cb0
BLAKE2b-256 checksum
How to use checksums
7095110dba9308971873b0a09ff7c254bbb966c90de8e8793dd2bc731bdfb99e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.0

Release files / py_sentry-1.6.0-py3-none-any.whl

Download URL py_sentry-1.6.0-py3-none-any.whl
Size 18.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f842690ecfbc28b116b843590a57967c7283eac4cafaa310c79cd4a979c67b58
BLAKE2b-256 checksum
How to use checksums
07656bfc1411ad0dc2d5ee8c789561b134ce40687ad36880ac7a9f3f6c04a2cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.0

Security for py-sentry 1.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.6.0 This release

2 release files No provenance

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