{ "info": { "author": "Antoine du Hamel", "author_email": "duhamelantoine1995@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# web_logger\n\nGet your log through the web. Why having a web logger rather than a native\ninterface?\n\n- Remote access (although it works perfectly locally)\n- UI customization (if you are confortable with CSS)\n\nThis application was built to run smoothly on a Raspberry Pi, however it has\nbeen designed on a platform agnostic way.\n\n### Getting started\n\nYou need `Python 3.5+` to run this package.\n\n#### Browser support\n\nA banner pops in on browsers which don't support the needed feature. Also, it\nhas been developed for those browsers:\n\n- Chrome 62+\n\n> On Windows the HTTP server is quite instable, you may need to reload the page\n> (press F5) if the logger get stuck before getting ready.\n\nPlease specify your browser path to the API.\n\n```python\nfrom web_logger import Logger, LoggerException\n\ndef demo(logger):\n logger.log(\"Logger ready\")\n\nLogger(\"/path/to/browser\", onReady=demo)\n```\n\n**Note:** Currently the python script needs to run on the `www` directory\ncontaining the interface files. However it is enough for the purpose of my\nprojects so I don't plan to fix this. If this behavior upsets you, you are very\nwelcome to submit a fix.\n\nTo customize the interface, you can copy all the files in another directory\nspecific to your project, you can do versioning on this folder and use this\nfolder as the working directory.\n\n#### API\n\nPlease see the `demo.py` file to see an example.\n\n```python\nlogger = Logger(\n browser_path, # if None or none provided, Logger will start in remote mode\n http_port=3000, # TCP port to use for the HTTP server\n ws_port=3001, # TCP port to use for the WebSocket server\n onReady=lambda _: None, # callback for when logger is ready\n )\n# the Logger constructor will block the thread until logger.stop is called\n# or the browser is closed if run in local mode\n\n# All methods should be called after the onReady callback has been called\ntry:\n logger.defineNewMenu(menu) # defines the menu items and action to be displayed on top of the logger\n logger.printMessage(message) # logs a message on the HTML interface\n logger.printMessage(message, audioFile=\"/audio.mp3\") # logs a message on the HTML interface and play the audio\nexcept LoggerException:\n print(\"Logger was not ready or has already terminated\")\n pass\n```\n\n##### Audio files\n\nYou have the ability to play audio sound on the interface by specifying a\n`audioFile` argument. Check what are the supported audio formats for the browser\nyou want to use.\n\n**N.B.:** The path to audio file will be sent to the browser and therefore need\nto be relative to the root of the HTTP server. The root of the HTTP server can\nbe set by changing the current directory. Because of HTTP specification, you\ncannot access the parent directory of the HTTP root folder.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/aduh95/web_logger", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "web-logger", "package_url": "https://pypi.org/project/web-logger/", "platform": "", "project_url": "https://pypi.org/project/web-logger/", "project_urls": { "Bug Tracker": "https://github.com/aduh95/web_logger/issues", "Homepage": "https://github.com/aduh95/web_logger", "Source Code": "https://github.com/aduh95/web_logger" }, "release_url": "https://pypi.org/project/web-logger/0.3.1/", "requires_dist": [ "websockets" ], "requires_python": ">=3.5", "summary": "Logger from python to HTML", "version": "0.3.1" }, "last_serial": 4451276, "releases": { "0.3.0": [ { "comment_text": "", "digests": { "md5": "d7bee89689951bc239b723e18499fda8", "sha256": "bf178df8ee9481cf2836e1ee60b5446e2c466eb5b50f509358da09618e19ca09" }, "downloads": -1, "filename": "web_logger-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d7bee89689951bc239b723e18499fda8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 8210, "upload_time": "2018-10-23T09:05:28", "url": "https://files.pythonhosted.org/packages/73/aa/20fc38447f000be21330a954ac191e91d7bccd5da5054852b4f8a6de9b43/web_logger-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "618d1dd73a23a494a03e543595640fa4", "sha256": "8b5ea18072c8dc2df7df283c9c4c3e17037d8987508f287bb8d578a098b22e73" }, "downloads": -1, "filename": "web_logger-0.3.0.tar.gz", "has_sig": false, "md5_digest": "618d1dd73a23a494a03e543595640fa4", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 5520, "upload_time": "2018-10-23T09:05:29", "url": "https://files.pythonhosted.org/packages/e6/05/386944018c5e7ecd76bcad6f820d4fbe38cb848b54aa3f3750529633d76d/web_logger-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "8c67d7d19a25065ff9684b7ec912dfe1", "sha256": "645207bc7287ae6cb810035450ad0a8e275ce220f72763d13153e724ba416b1c" }, "downloads": -1, "filename": "web_logger-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "8c67d7d19a25065ff9684b7ec912dfe1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 8471, "upload_time": "2018-11-05T02:28:22", "url": "https://files.pythonhosted.org/packages/9c/c9/2f535f016a1bcc66e787b78fb81dfd78ead9508516d2a2a4cc456585edb9/web_logger-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "421ff34b417ff33cccdd76838c660e21", "sha256": "fedc238669938f2f2b0c2a2a412de0c68f2520ad93110fd12da624c673aa8ecb" }, "downloads": -1, "filename": "web_logger-0.3.1.tar.gz", "has_sig": false, "md5_digest": "421ff34b417ff33cccdd76838c660e21", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 5670, "upload_time": "2018-11-05T02:28:24", "url": "https://files.pythonhosted.org/packages/e2/b2/7df51185353cb0ddc40b81339945060071162099e728698d4b1f6cfed3d6/web_logger-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8c67d7d19a25065ff9684b7ec912dfe1", "sha256": "645207bc7287ae6cb810035450ad0a8e275ce220f72763d13153e724ba416b1c" }, "downloads": -1, "filename": "web_logger-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "8c67d7d19a25065ff9684b7ec912dfe1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 8471, "upload_time": "2018-11-05T02:28:22", "url": "https://files.pythonhosted.org/packages/9c/c9/2f535f016a1bcc66e787b78fb81dfd78ead9508516d2a2a4cc456585edb9/web_logger-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "421ff34b417ff33cccdd76838c660e21", "sha256": "fedc238669938f2f2b0c2a2a412de0c68f2520ad93110fd12da624c673aa8ecb" }, "downloads": -1, "filename": "web_logger-0.3.1.tar.gz", "has_sig": false, "md5_digest": "421ff34b417ff33cccdd76838c660e21", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 5670, "upload_time": "2018-11-05T02:28:24", "url": "https://files.pythonhosted.org/packages/e2/b2/7df51185353cb0ddc40b81339945060071162099e728698d4b1f6cfed3d6/web_logger-0.3.1.tar.gz" } ] }