{ "info": { "author": "Adam Hooper", "author_email": "adam@adamhooper.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Software Development :: Build Tools" ], "description": "http-process-proxy\n==================\n\nLive-reloading HTTP reverse proxy for web development.\n\nInstallation\n~~~~~~~~~~~~\n\nFirst, `install Watchman\n`_.\n\nThen::\n\n pip install http-process-proxy\n\nOptionally, install a `LiveReload extension\n`_ on your development web browser. The\nextension lets you choose to _automatically_ refresh the page after files\nchange.\n\nUsage\n~~~~~\n\nFirst, you need a web server for http-process-proxy to invoke. Then wrap it::\n\n http-process-proxy localhost:8000 8001 \\\n --pattern 'src/**/*' \\\n --exclude 'src/**/test_*' \\\n --exec python ./manage.py runserver --noreload 8001\n\nThat is::\n\n http-process-proxy BIND:BINDPORT BACKEND:PORT [OPTIONS ...] --exec BACKENDCOMMAND ...\n\nWhere:\n\n* ``BIND:PORT`` is the address and port to listen on (e.g., ``0.0.0.0:8000``,\n ``localhost:9000``, ...)\n\n* ``BACKEND:PORT`` is the address of the server we're proxying\n\n* ``BACKENDCOMMAND ...`` is the command to run the web-server we're developing,\n which must listen on ``BACKEND:PORT``.\n\n* ``OPTIONS`` can include:\n\n * ``--pattern`` with any number of glob-style paths. Files matching *any* of\n the patterns (and not matching an ``--exclude`` pattern) can trigger a\n reload. (If unset, *any* file change triggers a reload -- the same effect\n as ``**/*``.)\n\n * ``--exclude`` with any number of glob-style paths. Files matching *any* of\n the patterns will never trigger a reload -- regardless of ``--pattern``.\n\nFeatures\n~~~~~~~~\n\n* Starts and proxies your web server, sending it all HTTP requests.\n\n* Supports WebSockets.\n\n* Queues HTTP requests until your web server is ready to respond.\n\n* Adds `Forwarded\n `_\n header so your web server knows the correct hostname.\n\n* Prints your web server's standard output and standard error.\n\n* Kills your server ``SIGKILL`` and restarts when its files change.\n\n* Responds with `503 Service Unavailable` if your web server crashes.\n\n* Closes keep-alive connections when responses may change.\n\n* Forwards Chunked-encoded responses, even when keep-alive is set.\n\n* Watches the current working directory for file modifications with\n `Watchman `_.\n\n* Respects `.watchmanconfig\n `_.\n\nDevelop\n~~~~~~~\n\n#. Run ``pip3 install --user -e .[dev]`` to install development tools.\n#. Change some code.\n#. If needed, modify the *Features* and *Usage* sections in this file.\n#. Fix styles with ``./reformat-source.sh``\n#. Manually test according to the *Features* and *Usage* sections in this file.\n (This project is an experiment; it's missing automated tests.)\n#. Submit a pull request.\n\nA useful test procedure (for testing everything but Websockets)::\n\n python3 -m httpprocessproxy localhost:8010 localhost:8011 \\\n --exec sh -c 'sleep 0.1 && python3 -m http.server 8011'\n\n # browse to http://localhost:8010 for a directory listing\n # Turn on LiveReload\n touch x # browser should show an extra file\n rm x # browser should hide the extra file\n\nFor websockets, a super-simple echo server::\n\n python3 -m httpprocessproxy localhost:8010 localhost:8011 \\\n --exec python3 ./test/servewebsockets.py\n\n # send a request\n echo 'test' | ws ws://localhost:8010/ws\n\n # keep a request open...\n ws ws://localhost:8010/ws\n # at this point, `touch x && rm x` would close the connection, because it\n # switches from \"running\" to \"killing\"\n\nMaintain\n~~~~~~~~\n\nUse `semver `_.\n\n#. Merge pull requests.\n#. Change: ``__version__`` in ``httpprocessproxy/__init__.py``.\n#. Add ``CHANGELOG.rst`` entry to the top of the file.\n#. Commit: ``git commit CHANGELOG.rst httpprocessproxy/__init__.py -m 'vX.X.X'`` but don't push.\n#. Tag: ``git tag vX.X.X``\n#. Push the new tag: ``git push --tags && git push``\n\nTravisCI will push to PyPi.\n\nDesign\n~~~~~~\n\nThis proxy server cycles through states. Each state decides how to respond to\nconnections and what to do when files change.\n\n1. *Loading*: starts the backend (your server) and pings with HTTP requests.\n * Incoming connections will queue.\n * State changes:\n * If a file is modified, kill the backend and transition to *Killing*.\n * If a ping succeeds, transition to *Running* and pass queued incoming\n connections to that state.\n * If backend exits, transition to *Error* and respond to all buffered\n incoming connections.\n2. *Running*: the backend is alive.\n * Incoming connections will pass through.\n * State changes:\n * If a file is modified, kill the backend and transition to *Killing*.\n Existing HTTP connections will \n Drop all live HTTP connections.\n * If the backend exits, transition to *Error*. Drop all live HTTP\n connections.\n3. *Error*: the web server exited of its own accord.\n * Incoming connections will lead to `503 Service Unavailable` errors.\n * State changes:\n * If a file is modified, transition to *Loading*.\n Complete all live HTTP connections.\n4. *Killing*: \n * Incoming connections will buffer.\n * State changes:\n * If a file is modified, do nothing.\n * When the subprocess exits, transition to *Loading*.\n\nIf the user hits ``Ctrl+C``, everything stops -- no matter what the state.\n\nLicense\n~~~~~~~\n\nCopyright (c) 2019 Adam Hooper. MIT license.", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/CJWorkbench/http-process-proxy", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "http-process-proxy", "package_url": "https://pypi.org/project/http-process-proxy/", "platform": "", "project_url": "https://pypi.org/project/http-process-proxy/", "project_urls": { "Homepage": "https://github.com/CJWorkbench/http-process-proxy" }, "release_url": "https://pypi.org/project/http-process-proxy/0.0.10/", "requires_dist": null, "requires_python": "", "summary": "HTTP reverse proxy to live-reload a web server", "version": "0.0.10" }, "last_serial": 5887402, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "b89e1197b0b310e0228bb3f08d8d5803", "sha256": "10a6495073d680ef8fa52b49a31ed32bd011817ea311041ce479dcca14c72920" }, "downloads": -1, "filename": "http-process-proxy-0.0.1.tar.gz", "has_sig": false, "md5_digest": "b89e1197b0b310e0228bb3f08d8d5803", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25986, "upload_time": "2019-02-20T16:35:26", "url": "https://files.pythonhosted.org/packages/62/28/23a7f2eae24c52cbf1ffa9ab47da8bf7654bf4bc803385f684a99fbb86be/http-process-proxy-0.0.1.tar.gz" } ], "0.0.10": [ { "comment_text": "", "digests": { "md5": "7e1fcd79ebcf67fc9bcca78305a88978", "sha256": "db6863d4a1664707319454d3562615cd8f4df476bbb0dafb71483d38fd816202" }, "downloads": -1, "filename": "http-process-proxy-0.0.10.tar.gz", "has_sig": false, "md5_digest": "7e1fcd79ebcf67fc9bcca78305a88978", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28431, "upload_time": "2019-09-25T21:56:41", "url": "https://files.pythonhosted.org/packages/7a/54/d018676b3e99abcefe4187013e6658fcf44b368afd85606d8f7e336f1768/http-process-proxy-0.0.10.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "7997a7be925937eae74e62973bddb26a", "sha256": "d04cddee08a40de52aa4f052fe2d3e0746c0bbc19067f14913f933356006e6ee" }, "downloads": -1, "filename": "http-process-proxy-0.0.2.tar.gz", "has_sig": false, "md5_digest": "7997a7be925937eae74e62973bddb26a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26728, "upload_time": "2019-02-20T19:18:27", "url": "https://files.pythonhosted.org/packages/a3/e7/848bc63b2ac59d06e61afe0e86bfeb3a0b821c320cfb71935ad9b5ad2f4a/http-process-proxy-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "c3cd347434fca6ab5ee65656bf7bb6d7", "sha256": "132ba2984a9affab780e4897627be563d3b90bda302501c37946baa7342893fa" }, "downloads": -1, "filename": "http-process-proxy-0.0.3.tar.gz", "has_sig": false, "md5_digest": "c3cd347434fca6ab5ee65656bf7bb6d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26760, "upload_time": "2019-02-20T20:35:59", "url": "https://files.pythonhosted.org/packages/f9/30/df2179c3b9af344cfc65a8f2ca01f62ce728718d4d1c0ccccfa3d2a9bef5/http-process-proxy-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "9f57fb659387a06d816e2f59f1641519", "sha256": "8ab8d37c351e069e9ec237bd724cdd28bf2534b6f3b2e1942f5da9d64d263e1f" }, "downloads": -1, "filename": "http-process-proxy-0.0.4.tar.gz", "has_sig": false, "md5_digest": "9f57fb659387a06d816e2f59f1641519", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26755, "upload_time": "2019-02-21T23:52:40", "url": "https://files.pythonhosted.org/packages/1a/9f/f268321fbf1650be2ef6cf93d88aa6e4737964236cd5827e1a65482a0812/http-process-proxy-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "c1871f286d43bfeab8a40a15672650ec", "sha256": "e5f28d6975f2978a32a27b147b4a966dc6741cfcd9c71121665fdb3362fb5e56" }, "downloads": -1, "filename": "http-process-proxy-0.0.5.tar.gz", "has_sig": false, "md5_digest": "c1871f286d43bfeab8a40a15672650ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26796, "upload_time": "2019-02-22T15:32:44", "url": "https://files.pythonhosted.org/packages/3a/ab/4506705b2b1e8d89d7a31b24548614ca64e5ef2db6126c1c2d1704e93496/http-process-proxy-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "5c5e6818672116e4ab820c14435fa817", "sha256": "4752e44b4a049bb3dfb1c2feb38bffa648e564b10ffb46045aff2d6853aa2275" }, "downloads": -1, "filename": "http-process-proxy-0.0.6.tar.gz", "has_sig": false, "md5_digest": "5c5e6818672116e4ab820c14435fa817", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27954, "upload_time": "2019-02-22T18:25:22", "url": "https://files.pythonhosted.org/packages/b1/9f/7a74add1f3b56b1251d94f9806d316cc0af376df9f291424972fbc6ef809/http-process-proxy-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "240532fda6a00e2ee6515bcebcf3bd22", "sha256": "1f5eb3ace909dddde08223619c55f2af6beb5f956dff08dde960e5c9de87536c" }, "downloads": -1, "filename": "http-process-proxy-0.0.7.tar.gz", "has_sig": false, "md5_digest": "240532fda6a00e2ee6515bcebcf3bd22", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27992, "upload_time": "2019-02-22T23:12:43", "url": "https://files.pythonhosted.org/packages/f8/10/19f73a56ba89eac47b4784fdbe6c7ed1d460201284a3aeabf3b5b0b6ceb8/http-process-proxy-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "a00276547690d0aae42a5d63f71f8d87", "sha256": "8a0a008c47c6632e766f48f4635657695c8524cb06e0dee9446a1ebc73be7298" }, "downloads": -1, "filename": "http-process-proxy-0.0.8.tar.gz", "has_sig": false, "md5_digest": "a00276547690d0aae42a5d63f71f8d87", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27996, "upload_time": "2019-02-27T00:06:38", "url": "https://files.pythonhosted.org/packages/4a/b8/ec80e8d1a06b05c040a9cf44cff45a56b2c57a1dcb9ba9392ac4e6a0f870/http-process-proxy-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "c9d18db3283d55ee01331ed1d12f0785", "sha256": "e6e70b797eb5d7588d24a83d3406736815d5af2e9d7997998eccfaab186ffc9c" }, "downloads": -1, "filename": "http-process-proxy-0.0.9.tar.gz", "has_sig": false, "md5_digest": "c9d18db3283d55ee01331ed1d12f0785", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27977, "upload_time": "2019-02-27T00:36:13", "url": "https://files.pythonhosted.org/packages/08/c5/3e04099db2449591345fa66173832a57d8cb0de93cd070da7da399e4fcda/http-process-proxy-0.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7e1fcd79ebcf67fc9bcca78305a88978", "sha256": "db6863d4a1664707319454d3562615cd8f4df476bbb0dafb71483d38fd816202" }, "downloads": -1, "filename": "http-process-proxy-0.0.10.tar.gz", "has_sig": false, "md5_digest": "7e1fcd79ebcf67fc9bcca78305a88978", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28431, "upload_time": "2019-09-25T21:56:41", "url": "https://files.pythonhosted.org/packages/7a/54/d018676b3e99abcefe4187013e6658fcf44b368afd85606d8f7e336f1768/http-process-proxy-0.0.10.tar.gz" } ] }