{ "info": { "author": "Ramiro Aznar, Jorge Sanz", "author_email": "ramiroaznar@carto.com, jsanz@carto.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7" ], "description": "# carto-report\n\n\nA Python module to export a database metrics as a html file for CARTO organization user.\n\n## Installation\n\nYou can install carto-report by cloning this repository or by using [Pip](http://pypi.python.org/pypi/pip):\n\n```sh\n$ pip install carto-report\n```\n\nIf you want to use the development version, you can install directly from github:\n\n```sh\n$ pip install -e git+git://github.com/CartoDB/carto-report.git#egg=carto\n```\n\nIf using, the development version, you might want to install dependencies as well:\n\n```\n$ pip install -r requirements.txt\n```\n\n*Only tested in Python 3*\n\n## Usage Example\n\n### Command Line application\n\nThe package installs a command line application `carto_report` that has the following usage instructions:\n\n```sh\n$ carto_report -h\n```\n```text\nusage: carto_report [-h] [--user-name CARTO_USER] [--api_key CARTO_API_KEY]\n [--api_url CARTO_API_URL] [--organization CARTO_ORG]\n [--output OUTPUT] [--quota QUOTA]\n [--loglevel {DEBUG,INFO,WARNING,ERROR}]\n\nCARTO reporting tool\n\noptional arguments:\n -h, --help show this help message and exit\n --user-name CARTO_USER, -U CARTO_USER\n Account user name (defaults to env variable\n CARTO_USER)\n --api_key CARTO_API_KEY, -a CARTO_API_KEY\n Api key of the account (defaults to env variable\n CARTO_API_KEY)\n --api_url CARTO_API_URL, -u CARTO_API_URL\n Set the base URL. For example:\n https://username.carto.com/ (defaults to env variable\n CARTO_API_URL)\n --organization CARTO_ORG, -o CARTO_ORG\n Set the name of the organization account (defaults to\n env variable CARTO_ORG)\n --output OUTPUT File path for the report, defaults to report.html\n --quota QUOTA, -q QUOTA\n LDS quota for the user, defaults to 5000\n --loglevel {DEBUG,INFO,WARNING,ERROR}, -l {DEBUG,INFO,WARNING,ERROR}\n How verbose the output should be, default to the most\n silent\n```\n\n### As a python module\n\n```python\nfrom carto_report.report import Reporter\n\nreporter = Reporter(CARTO_USER, CARTO_API_URL, CARTO_ORG, API_KEY, USER_QUOTA)\n\nwith open('/tmp/report.html','w') as writer:\n writer.write(reporter.report())\n```\n\nWhere the different parameters are:\n\n* `CARTO_USER`: user name of the account to check\n* `CARTO_API_URL`: this is usually `https://{CARTO_USER}.carto.com/` but may differ if you are not using `carto.com` accounts\n* `CARTO_API_KEY`: your CARTO ENGINE master API key\n* `USER_QUOTA`: your LDS quota\n\n\nKnown Issues\n============\n\n- [x] Improve report layout and style (with Airship).\n- [ ] Add assertions.\n- [ ] Use conditionals within the template.\n- [x] Add debug loggins to bet feedback, especially when getting all tables and analysis.\n- [x] Include logging as a proper library.", "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/CartoDB/labs-db-metrics", "keywords": "carto cli cartodb api reporting postgres", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "carto-report", "package_url": "https://pypi.org/project/carto-report/", "platform": "", "project_url": "https://pypi.org/project/carto-report/", "project_urls": { "Homepage": "https://github.com/CartoDB/labs-db-metrics" }, "release_url": "https://pypi.org/project/carto-report/0.0.3/", "requires_dist": null, "requires_python": "", "summary": "A module to export CARTO user database metrics", "version": "0.0.3" }, "last_serial": 4599743, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "6d5ae4fa748d83d58fd4b5cb7ad4c81c", "sha256": "d34c77f9b9363a286a6f049dc3c0fe08897e26ecc731fdecce305c61ffbd2573" }, "downloads": -1, "filename": "carto-report-0.0.1.tar.gz", "has_sig": false, "md5_digest": "6d5ae4fa748d83d58fd4b5cb7ad4c81c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11614, "upload_time": "2018-12-13T14:08:41", "url": "https://files.pythonhosted.org/packages/e6/e0/7200e4489f852a83db403305af57aae8e555daffdb4c9d5664a3a4d67832/carto-report-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "9460e9871fc5edd1e0abce8c56ac5fd2", "sha256": "9d79f66910fd3a5174ec0f2bdf9dac0c9d1a519ff94a7f8cd0af91f1c414b1a9" }, "downloads": -1, "filename": "carto-report-0.0.2.tar.gz", "has_sig": false, "md5_digest": "9460e9871fc5edd1e0abce8c56ac5fd2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12698, "upload_time": "2018-12-13T14:40:59", "url": "https://files.pythonhosted.org/packages/b0/d8/cbf3f91a2d2e47cc8c0c1dc891a2c4f149669f1f45b33d7b356f311b54ff/carto-report-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "38f24617d69e2ad3d5b3b79666a2d838", "sha256": "860ebd409ec8d1ef7ad94e0bc60b81a9f34ddfba9caa31a38efa9fd71ce6484b" }, "downloads": -1, "filename": "carto-report-0.0.3.tar.gz", "has_sig": false, "md5_digest": "38f24617d69e2ad3d5b3b79666a2d838", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12699, "upload_time": "2018-12-14T12:58:14", "url": "https://files.pythonhosted.org/packages/f4/06/8ff1f1c2e6c5f7cd9a79dea4e318fbfbff573a4ae8869459ddeb91eec4b3/carto-report-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "38f24617d69e2ad3d5b3b79666a2d838", "sha256": "860ebd409ec8d1ef7ad94e0bc60b81a9f34ddfba9caa31a38efa9fd71ce6484b" }, "downloads": -1, "filename": "carto-report-0.0.3.tar.gz", "has_sig": false, "md5_digest": "38f24617d69e2ad3d5b3b79666a2d838", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12699, "upload_time": "2018-12-14T12:58:14", "url": "https://files.pythonhosted.org/packages/f4/06/8ff1f1c2e6c5f7cd9a79dea4e318fbfbff573a4ae8869459ddeb91eec4b3/carto-report-0.0.3.tar.gz" } ] }