[Python-ideas] Skeletal PEP (version 0.1): Background process services
ben+python at benfinney.id.au
Fri Jan 30 06:46:13 CET 2009
Many people evidently want a proposal for a “service” interface, and
saw part of what they wanted in the separate discussion of the
“Standard daemon process library”. As discussed there, a Unix daemon
is a quite distinct, yet complementary, concept to a service.
This is a skeleton of a PEP, presented in order that discussion of
what people want from a “service” has a concrete focus. The
specification is based on work from Trent Nelson.
Note that I'm *not* intending to propose, implement, or champion this
PEP. I present it as is because there is a clear desire to see
something like it, and in the hope that those with more enthusiasm for
it can take it and improve on it to the point where it gets a
:Title: Background process services
:Last-Modified: 2009-01-30 16:40
:Author: Ben Finney <ben+python at benfinney.id.au>
:Type: Standards Track
This PEP introduces a package to the Python standard library that
provides an interface to the task of creating a separate background
process, and maintaining an ongoing service channel with that process.
Table of Contents:
A new package, `service`, is added to the standard library.
The package defines a class, `Service`, used to set up and maintain
A `Service` instance represents a control channel to a separate,
background process that runs concurrently with the existing program.
The existing program communicates with that background process via the
corresponding `Service` instance.
`__init__(self, func, name, desc=None, startup_type=StartupType.Auto)`
Initialises the parameters of a new service […]
The `func` argument is a callable, which will be called to run in
the background process when the service is started.
Returns ``True`` if the background process is currently running […]
Returns ``True`` if […]
`report_event(self, msg, event_type, id, category, data)`
Start a new background process running the `func` callable […]
* On Unix, this creates a new daemon process.
* On MacOS, […].
* On MS Windows, […].
Stop the background process […]
This work is hereby placed in the public domain. To the extent that
placing a work in the public domain is not legally possible, the
copyright holder hereby grants to all recipients of this work all
rights and freedoms that would otherwise be restricted by copyright.
time-stamp-start: "^:Last-Modified:[ ]+"
time-stamp-format: "%:y-%02m-%02d %02H:%02M"
vim: filetype=rst fileencoding=utf-8 :
More information about the Python-ideas