hupper


Namehupper JSON
Version 1.12.1 PyPI version JSON
download
home_pagehttps://github.com/Pylons/hupper
SummaryIntegrated process monitor for developing and reloading daemons.
upload_time2024-01-26 09:14:57
maintainer
docs_urlNone
authorMichael Merickel
requires_python>=3.7
licenseMIT
keywords server daemon autoreload reloader hup file watch process
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            ======
hupper
======

.. image:: https://img.shields.io/pypi/v/hupper.svg
    :target: https://pypi.python.org/pypi/hupper

.. image:: https://github.com/Pylons/hupper/actions/workflows/ci-tests.yml/badge.svg?branch=main
    :target: https://github.com/Pylons/hupper/actions/workflows/ci-tests.yml?query=branch%3Amain

.. image:: https://readthedocs.org/projects/hupper/badge/?version=latest
    :target: https://readthedocs.org/projects/hupper/?badge=latest
    :alt: Documentation Status

``hupper`` is an integrated process monitor that will track changes to
any imported Python files in ``sys.modules`` as well as custom paths. When
files are changed the process is restarted.

Command-line Usage
==================

Hupper can load any Python code similar to ``python -m <module>`` by using the
``hupper -m <module>`` program.

.. code-block:: console

   $ hupper -m myapp
   Starting monitor for PID 23982.

API Usage
=========

Start by defining an entry point for your process. This must be an importable
path in string format. For example, ``myapp.scripts.serve.main``.

.. code-block:: python

    # myapp/scripts/serve.py

    import sys
    import hupper
    import waitress


    def wsgi_app(environ, start_response):
        start_response('200 OK', [('Content-Type', 'text/plain')])
        yield b'hello'


    def main(args=sys.argv[1:]):
        if '--reload' in args:
            # start_reloader will only return in a monitored subprocess
            reloader = hupper.start_reloader('myapp.scripts.serve.main')

            # monitor an extra file
            reloader.watch_files(['foo.ini'])

        waitress.serve(wsgi_app)

Acknowledgments
===============

``hupper`` is inspired by initial work done by Carl J Meyer and David Glick
during a Pycon sprint and is built to be a more robust and generic version of
Ian Bicking's excellent PasteScript ``paste serve --reload`` and Pyramid's
``pserve --reload``.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Pylons/hupper",
    "name": "hupper",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "server,daemon,autoreload,reloader,hup,file,watch,process",
    "author": "Michael Merickel",
    "author_email": "pylons-discuss@googlegroups.com",
    "download_url": "https://files.pythonhosted.org/packages/bd/e6/bb064537288eee2be97f3e0fcad8e7242bc5bbe9664ae57c7d29b3fa18c2/hupper-1.12.1.tar.gz",
    "platform": null,
    "description": "======\nhupper\n======\n\n.. image:: https://img.shields.io/pypi/v/hupper.svg\n    :target: https://pypi.python.org/pypi/hupper\n\n.. image:: https://github.com/Pylons/hupper/actions/workflows/ci-tests.yml/badge.svg?branch=main\n    :target: https://github.com/Pylons/hupper/actions/workflows/ci-tests.yml?query=branch%3Amain\n\n.. image:: https://readthedocs.org/projects/hupper/badge/?version=latest\n    :target: https://readthedocs.org/projects/hupper/?badge=latest\n    :alt: Documentation Status\n\n``hupper`` is an integrated process monitor that will track changes to\nany imported Python files in ``sys.modules`` as well as custom paths. When\nfiles are changed the process is restarted.\n\nCommand-line Usage\n==================\n\nHupper can load any Python code similar to ``python -m <module>`` by using the\n``hupper -m <module>`` program.\n\n.. code-block:: console\n\n   $ hupper -m myapp\n   Starting monitor for PID 23982.\n\nAPI Usage\n=========\n\nStart by defining an entry point for your process. This must be an importable\npath in string format. For example, ``myapp.scripts.serve.main``.\n\n.. code-block:: python\n\n    # myapp/scripts/serve.py\n\n    import sys\n    import hupper\n    import waitress\n\n\n    def wsgi_app(environ, start_response):\n        start_response('200 OK', [('Content-Type', 'text/plain')])\n        yield b'hello'\n\n\n    def main(args=sys.argv[1:]):\n        if '--reload' in args:\n            # start_reloader will only return in a monitored subprocess\n            reloader = hupper.start_reloader('myapp.scripts.serve.main')\n\n            # monitor an extra file\n            reloader.watch_files(['foo.ini'])\n\n        waitress.serve(wsgi_app)\n\nAcknowledgments\n===============\n\n``hupper`` is inspired by initial work done by Carl J Meyer and David Glick\nduring a Pycon sprint and is built to be a more robust and generic version of\nIan Bicking's excellent PasteScript ``paste serve --reload`` and Pyramid's\n``pserve --reload``.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Integrated process monitor for developing and reloading daemons.",
    "version": "1.12.1",
    "project_urls": {
        "Changelog": "https://docs.pylonsproject.org/projects/hupper/en/latest/changes.html",
        "Documentation": "https://docs.pylonsproject.org/projects/hupper/en/latest/",
        "Homepage": "https://github.com/Pylons/hupper",
        "Issue Tracker": "https://github.com/Pylons/hupper/issues"
    },
    "split_keywords": [
        "server",
        "daemon",
        "autoreload",
        "reloader",
        "hup",
        "file",
        "watch",
        "process"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "867d3888833e4f5ea56af4a9935066ec09a83228e533d7b8877f65889d706ee4",
                "md5": "f6e34068fff81e7e3c0a0ddd001da6f7",
                "sha256": "e872b959f09d90be5fb615bd2e62de89a0b57efc037bdf9637fb09cdf8552b19"
            },
            "downloads": -1,
            "filename": "hupper-1.12.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f6e34068fff81e7e3c0a0ddd001da6f7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 22830,
            "upload_time": "2024-01-26T09:14:55",
            "upload_time_iso_8601": "2024-01-26T09:14:55.176326Z",
            "url": "https://files.pythonhosted.org/packages/86/7d/3888833e4f5ea56af4a9935066ec09a83228e533d7b8877f65889d706ee4/hupper-1.12.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bde6bb064537288eee2be97f3e0fcad8e7242bc5bbe9664ae57c7d29b3fa18c2",
                "md5": "773e07afa457cf4e812996df086fe7ef",
                "sha256": "06bf54170ff4ecf4c84ad5f188dee3901173ab449c2608ad05b9bfd6b13e32eb"
            },
            "downloads": -1,
            "filename": "hupper-1.12.1.tar.gz",
            "has_sig": false,
            "md5_digest": "773e07afa457cf4e812996df086fe7ef",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 43231,
            "upload_time": "2024-01-26T09:14:57",
            "upload_time_iso_8601": "2024-01-26T09:14:57.294780Z",
            "url": "https://files.pythonhosted.org/packages/bd/e6/bb064537288eee2be97f3e0fcad8e7242bc5bbe9664ae57c7d29b3fa18c2/hupper-1.12.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-26 09:14:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Pylons",
    "github_project": "hupper",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "hupper"
}
        
Elapsed time: 0.36821s