Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonathanhood/bottledaemon
Create daemons out of bottle applications.
https://github.com/jonathanhood/bottledaemon
Last synced: about 2 months ago
JSON representation
Create daemons out of bottle applications.
- Host: GitHub
- URL: https://github.com/jonathanhood/bottledaemon
- Owner: jonathanhood
- Created: 2014-07-24T02:43:06.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-07-28T04:09:01.000Z (over 4 years ago)
- Last Synced: 2024-10-04T01:19:06.374Z (3 months ago)
- Language: Python
- Homepage: https://pypi.python.org/pypi/BottleDaemon
- Size: 145 KB
- Stars: 7
- Watchers: 3
- Forks: 9
- Open Issues: 5
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
Bottle Daemon
=============A simple tool to help make bottle appliations run in the background as a unix/linux daemon. Try it out by installing with pip::
> pip install bottledaemon
Or, alternatively, install from source::
> git clone https://github.com/jonathanhood/bottledaemon.git
> cd bottledaemon
> python setup.py installUsage is pretty straighforward:
.. sourcecode:: python
from bottledaemon import daemon_run
from bottle import route@route("/hello")
def hello():
return "Hello World"if __name__ == "__main__":
daemon_run()The above application will launch in the background. This top-level script can be used to start/stop the background process easily::
jonathans-air:bottle-daemon jhood$ python bottledaemon/bottledaemon.py
usage: bottledaemon.py [-h] {start,stop}The daemon library guarantees that your application will only be lauched a single time - so multiple "start" commands are OK.