{ "info": { "author": "Louis RIVIERE", "author_email": "louis@riviere.xyz", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Topic :: Software Development :: Testing" ], "description": "########\nprettypy\n########\n\n**Python Pretty Printer**\n\n========\nAbstract\n========\n\nThe **prettypy** package is yet another 'pretty printer'.\n\nIt is meant to:\n\n* have a **readable and consistent** output.\n - Nested levels are indented. (the indentation string is configurable (4 spaces by default))\n - The sequences and the mapping keys are sorted. (can be disabled)\n - Mapping keys are padded. (so the values are aligned)\n - The data types may be shown. (disabled by default)\n\n* be **simple** to use.\n - Only one class is required.\n - A convinience function is also provided.\n\n* be **extensible**\n - If the provided support for standard types doesn't suit your need, it's easy to modify it.\n - Any object can easaly be supported.\n\n* be able to handle **large data structure**.\n - Sequences, mappings, strings and multi-lines can be truncated as needed.\n - Mapping items can be omitted based on regex.\n\n=====\nUsage\n=====\n\nThere are 2 basic ways to use prettypy: With the **Printer** class or the **dump** function.\n\n------------------\nThe Printer class:\n------------------\n\n.. code-block:: python\n\n from prettypy import Printer\n\n p = Printer()\n p.print(some_data_structure)\n\nThe **Printer.print** method sends a formatted representation of its argument to a file-like destination (stdout by default). \n\n------------------\nThe dump function:\n------------------\n\n.. code-block:: python\n\n from prettypy import dump\n\n dump(some_data_structure)\n\nThe **dump** function uses the **Printer** class to 'dump' its argument on stdout as well as to a file ('prettypy.dump' by default).\n\n==================\nData Types support\n==================\n\nThere are 2 ways for an object to be \"printable\" / \"dumpable\":\n\n-------------------\nThe Formatter class\n-------------------\n\nThe **Printer** class needs one **Formatter** for each supported data type (exept for string). \n\nA set of default **Formatter** is provided by the formatters module for Python's builtin types and should be good enough for most purposes. \n\nThese formatters can be modified or extended at will to support new types or modify the output for existing ones. \n\n--------------------\nThe __print__ method\n--------------------\n\nAny object can become 'printable' by implementing the **__print__** method which will call the Printer's methods in appropriate ways.\n\n============\nInstallation\n============\n\n.. code-block:: shell \n\n $ pip install prettypy", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/louis-riviere-xyz/prettypy", "keywords": "testing,logging,debugging", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "prettypy", "package_url": "https://pypi.org/project/prettypy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/prettypy/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/louis-riviere-xyz/prettypy" }, "release_url": "https://pypi.org/project/prettypy/0.5.0/", "requires_dist": null, "requires_python": null, "summary": "Python Pretty Printer", "version": "0.5.0" }, "last_serial": 2490315, "releases": { "0.1": [], "0.2.0": [], "0.2.1": [], "0.2.2": [], "0.2.3": [], "0.2.4": [], "0.2.5": [], "0.2.6": [], "0.2.7": [], "0.2.8": [], "0.2.9": [], "0.3.0": [], "0.3.1": [ { "comment_text": "", "digests": { "md5": "eda39177c178c3af8fcc7fada0ee29dd", "sha256": "bf3e68c5508cbef48f024dfa7201e0cceafeb803baf217949d7a42ea81bbfb10" }, "downloads": -1, "filename": "prettypy-0.3.1.tar.gz", "has_sig": false, "md5_digest": "eda39177c178c3af8fcc7fada0ee29dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6609, "upload_time": "2016-11-14T18:21:05", "url": "https://files.pythonhosted.org/packages/69/46/10ef6db3ffeb18195981f3ab70ab811245f5f235879fcf1c36f0ce47f014/prettypy-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "6fd2c2ae87892bee79944fea9f40c56c", "sha256": "76c312a2f5b1a9c6ac4e83ce4ee35bbf9dc7ca92660a91bdf0fe1ee921f950af" }, "downloads": -1, "filename": "prettypy-0.3.2.tar.gz", "has_sig": false, "md5_digest": "6fd2c2ae87892bee79944fea9f40c56c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6650, "upload_time": "2016-11-15T17:54:23", "url": "https://files.pythonhosted.org/packages/4a/08/bdf968276c618e2872f9d15637495a12b1b240f42df83959bcc1bc995f09/prettypy-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "2fa310483eb6352a90b8489e1a128afe", "sha256": "a88de165be409e232262646127a1cbcc36eddf1744aae092322c71b5417cc4b9" }, "downloads": -1, "filename": "prettypy-0.3.3.tar.gz", "has_sig": false, "md5_digest": "2fa310483eb6352a90b8489e1a128afe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6663, "upload_time": "2016-11-15T17:57:56", "url": "https://files.pythonhosted.org/packages/ad/9e/21e01ccce9559f55d935af7c1b396654bc2eff39b7e1336274d31c81c71d/prettypy-0.3.3.tar.gz" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "5caa152a68dfa8a8dfd5051595f8a421", "sha256": "589aea2c808101e00019f80f3feb18a59d3d93260380ec79f62f3d2d9f8c74a7" }, "downloads": -1, "filename": "prettypy-0.3.4.tar.gz", "has_sig": false, "md5_digest": "5caa152a68dfa8a8dfd5051595f8a421", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6666, "upload_time": "2016-11-15T18:07:02", "url": "https://files.pythonhosted.org/packages/d1/2b/2c45783495f777e5d0be8447a1dfdac61d60ef5303677bae5e65811a73f1/prettypy-0.3.4.tar.gz" } ], "0.3.5": [ { "comment_text": "", "digests": { "md5": "06d06379b4685111998342d4dc5bcade", "sha256": "0eb22ba5924ad2494956e4675fcdab81ff297b297d85090f00b2c2104e165fad" }, "downloads": -1, "filename": "prettypy-0.3.5.tar.gz", "has_sig": false, "md5_digest": "06d06379b4685111998342d4dc5bcade", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7133, "upload_time": "2016-11-15T18:25:00", "url": "https://files.pythonhosted.org/packages/97/e9/1db12a78430cee1be08e1315e68a179a69f5b48f12bd41af1bbff410845e/prettypy-0.3.5.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "4444e52c59739082bf8bd32136aeeab5", "sha256": "6562618ce07f936238c029f119603c5bf2947d1df36516aac9556d4d43601540" }, "downloads": -1, "filename": "prettypy-0.4.0.tar.gz", "has_sig": false, "md5_digest": "4444e52c59739082bf8bd32136aeeab5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7331, "upload_time": "2016-11-28T18:19:39", "url": "https://files.pythonhosted.org/packages/ad/b5/a01aaa832e837bcb657c731f7e6fdcdd30a2adf7d653685d3cb929d65f22/prettypy-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "6ec4f49d64b924820a0c5ced1cc43e63", "sha256": "c1cd5069319f28e771b0bbc3a233ec6eb1fef19c4f336e92a1c4109d699a2aa0" }, "downloads": -1, "filename": "prettypy-0.5.0.tar.gz", "has_sig": false, "md5_digest": "6ec4f49d64b924820a0c5ced1cc43e63", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7816, "upload_time": "2016-11-29T19:02:16", "url": "https://files.pythonhosted.org/packages/df/40/94f87ed24cfb0e023938f1817536a8615c930494aeda6526919fed908e0b/prettypy-0.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6ec4f49d64b924820a0c5ced1cc43e63", "sha256": "c1cd5069319f28e771b0bbc3a233ec6eb1fef19c4f336e92a1c4109d699a2aa0" }, "downloads": -1, "filename": "prettypy-0.5.0.tar.gz", "has_sig": false, "md5_digest": "6ec4f49d64b924820a0c5ced1cc43e63", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7816, "upload_time": "2016-11-29T19:02:16", "url": "https://files.pythonhosted.org/packages/df/40/94f87ed24cfb0e023938f1817536a8615c930494aeda6526919fed908e0b/prettypy-0.5.0.tar.gz" } ] }