Skip to main content

Jetsam

  • True daemonizer using native C calls
  • Currently only compatible with *nix file systems
  • Extra Paranoid Edition uses that double fork magic!

jetsam definition: floating debris ejected from a ship

C Extension

To showcase a C library being used as a native python module

Example

import time
import logging
import jetsam
from jetsam import daemon

# jetsam will log pids and errors from daemons
# to a single log file. It will also update the file
# with the current status of the daemon
#
#   function_name:pid:status
#
jetsam.set_logfile("user_daemon.log")  # defaults to /tmp/jetsam.log


@daemon
def func():
    logging.basicConfig(filename="func.log", level=logging.DEBUG, filemode="w")
    while True:
        time.sleep(1)
        logging.debug("I am running in my own interpreter!")


func()  # detachs from current interpreter each function immediately returns 

print("simulate long running process...")
time.sleep(3)

jetsam.end_daemon(func)

print("Eject and forget with jetsam!")

Metadata

Release files for jetsam 0.2.1

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

Source distribution (sdist)

Source distribution for jetsam 0.2.1
File Size Uploaded Provenance
jetsam-0.2.1.tar.gz 7.2 kB Without provenance Details

Release files / jetsam-0.2.1.tar.gz

Download URL jetsam-0.2.1.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a7c25ac312931e9e5a30bdd575d866dff417e50a3a7d24e6d99a724c97fffd28
BLAKE2b-256 checksum
How to use checksums
9b11b7fe1da14fb3e3bc44058ee03d320464ada2bde5698156a6c3e015c5c6f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Security for jetsam 0.2.1

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.

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