{ "info": { "author": "Grey Rook GmbH", "author_email": "f.elsner@greyrook.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# Lumberpy\n\n* Free software: MIT license\n\n## Config format\n\nThe config format is based on the (python standard lib dict config format)[https://docs.python.org/3/howto/logging-cookbook.html#an-example-dictionary-based-configuration]. There are a few extra keys and more defaults.\n\n* By default a colored formatter based on ... is used.\n\n### Default log format\n\n```\n\"{asctime} {levelname:3.3} {name}: {message}\"\n```\n\nExample:\n\n![](docs/default_log_output.png)\n\nReasoning:\n\n* TODO\n\n## Usage Logging configuration\n\nApplications using lumber usually have three ways to configure logging:\n\n1. via the CLI (e.g. `-v` to set log leve to `DEBUG`)\n2. via config file (path provided by cli or environment variable)\n3. via environment variables\n\nIf several are provided precedence in that order. For example:\n\n* If `-v` is provided log level from config file and via environment variable, the later two are ignored\n* If providing a config path via cli and via environment variable only former is used.\n\n### Environment variables\n\nThe following variables are available\n\n* `LUMBER_CONFIG_PATH` load config from provided path\n* `LUMBER_LEVEL` sets the log level, (e.g. DEBUG or as integer 1 to 60)\n* `LUMBER_FORMAT` to set the default log format.\n\n## How to include in your software\n\n```\nimport lumberpy\nLOG = logging.getLogger(__name__)\n\n@click.command()\n@click.option('--lumberpy-config-path', type=click.Path())\n@click.option('-v', '--verbose', count=True)\ndef main(lumberpy_config_path, verbose):\n \"\"\"Console script for python_boilerplate.\"\"\"\n lumberpy.setup(lumberpy_config_path, verbose)\n\n LOG.warning(\"A waring\")\n return 0\n```\n\nWith the main goal of lumberpy being to cut down on boilerplate there is an even shorter way to add the click options:\n\n```\nimport lumberpy.click\n\n\n@click.command()\n@lumberpy.click.options()\ndef main(lumberpy_config_path, verbose):\n lumberpy.setup(lumberpy_config_path, verbose)\n```\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://gitlab.com/GreyRook/lumberpy", "keywords": "lumberpy", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "lumberpy", "package_url": "https://pypi.org/project/lumberpy/", "platform": "", "project_url": "https://pypi.org/project/lumberpy/", "project_urls": { "Homepage": "https://gitlab.com/GreyRook/lumberpy" }, "release_url": "https://pypi.org/project/lumberpy/0.1.0/", "requires_dist": [ "Click (>=6.0)", "coloredlogs (==10.0)" ], "requires_python": "", "summary": "Lumberpy is an easily configurable python3 module for advanced logging use cases", "version": "0.1.0" }, "last_serial": 5872718, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "ae5e2c17a8634b6e9eb27bcfa3d2c0e3", "sha256": "f6ed3ae7c23810fc14804a970feebe196750144c6b7a0d78d7481a98aff4ad10" }, "downloads": -1, "filename": "lumberpy-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ae5e2c17a8634b6e9eb27bcfa3d2c0e3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6148, "upload_time": "2019-09-23T10:10:47", "url": "https://files.pythonhosted.org/packages/07/ae/3538e3a5a37b89e44cba9fc7ae7f9c1796274d3247586d7b73b1af96eb6e/lumberpy-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "74c3765f603bf98af9422acb8780a234", "sha256": "49d30a2c877a2aa60bb560ab3f922214c136de2cae602e0f30fae59e6be93f77" }, "downloads": -1, "filename": "lumberpy-0.1.0.tar.gz", "has_sig": false, "md5_digest": "74c3765f603bf98af9422acb8780a234", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38310, "upload_time": "2019-09-23T10:10:50", "url": "https://files.pythonhosted.org/packages/95/ea/34ee0545b622394326bfe409d4ea14c24711b81bb3a1ba76c2d93bb6e8c0/lumberpy-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ae5e2c17a8634b6e9eb27bcfa3d2c0e3", "sha256": "f6ed3ae7c23810fc14804a970feebe196750144c6b7a0d78d7481a98aff4ad10" }, "downloads": -1, "filename": "lumberpy-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ae5e2c17a8634b6e9eb27bcfa3d2c0e3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6148, "upload_time": "2019-09-23T10:10:47", "url": "https://files.pythonhosted.org/packages/07/ae/3538e3a5a37b89e44cba9fc7ae7f9c1796274d3247586d7b73b1af96eb6e/lumberpy-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "74c3765f603bf98af9422acb8780a234", "sha256": "49d30a2c877a2aa60bb560ab3f922214c136de2cae602e0f30fae59e6be93f77" }, "downloads": -1, "filename": "lumberpy-0.1.0.tar.gz", "has_sig": false, "md5_digest": "74c3765f603bf98af9422acb8780a234", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38310, "upload_time": "2019-09-23T10:10:50", "url": "https://files.pythonhosted.org/packages/95/ea/34ee0545b622394326bfe409d4ea14c24711b81bb3a1ba76c2d93bb6e8c0/lumberpy-0.1.0.tar.gz" } ] }