{ "info": { "author": "Adrian Perez de Castro", "author_email": "aperez@igalia.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "===============\n hipack-python\n===============\n\n.. image:: https://readthedocs.org/projects/hipack-python/badge/?version=latest\n :target: https://hipack-python.readthedocs.org/en/latest\n :alt: Documentation Status\n\n.. image:: https://img.shields.io/travis/aperezdc/hipack-python.svg?style=flat\n :target: https://travis-ci.org/aperezdc/hipack-python\n :alt: Build Status\n\n.. image:: https://img.shields.io/coveralls/aperezdc/hipack-python/master.svg?style=flat\n :target: https://coveralls.io/r/aperezdc/hipack-python?branch=master\n :alt: Code Coverage\n\n\n``hipack`` is a Python module to work with the `HiPack `_\nserialization format. The API is intentionally similar to that of the standard\n``json`` and ``pickle`` modules.\n\nFeatures:\n\n* Both reading, and writing `HiPack version 1\n `__ is supported. The\n following extensions are implemented as well:\n\n - `HEP-1: Value Annotations\n `__.\n\n (Note that extensions defined in HEPs are subject to change while they are\n being discussed as proposals.)\n\n* Small, self-contained, pure Python implementation.\n\n* Compatible with both Python 2.6 (or newer), and 3.2 (or newer).\n\n\nUsage\n=====\n\nGiven the following input file:\n\n.. code-block::\n\n # Configuration file for SuperFooBar v3000\n interface {\n language: \"en_US\"\n panes {\n top: [\"menu\", \"toolbar\"] # Optional commas in lists\n # The colon separating keys and values is optional\n bottom\n [\"statusbar\"]\n }\n \u263a : True # Enables emoji\n Unicode\u2192Su\u00fe\u00feorte\u00f0? : \"Indeed, J\u00fcrgen!\"\n }\n\n # Configure plug-ins\n plugin: {\n preview # Whitespace is mostly ignored\n {\n enabled: true\n timeout: 500 # Update every 500ms\n }\n }\n\nNote that the ``:`` separator in between keys and values is optional, and\ncan be omitted. Also, notice how white space \u2014including new lines\u2014 are\ncompletely meaningless and the structure is determined using only braces\nand brackets. Last but not least, a valid key is any Unicode character\nsequence which *does not* include white space or a colon.\n\nThe following code can be used to read it into a Python dictionary:\n\n.. code-block:: python\n\n import hipack\n with open(\"superfoobar3000.conf\", \"rb\") as f:\n config = hipack.load(f)\n\nConversions work as expected:\n\n* Sections are converted into dictionaries.\n* Keys are converted conveted to strings.\n* Text in double quotes are converted to strings.\n* Sections enclosed into ``{ }`` are converted to dictionaries.\n* Arrays enclosed into ``[ ]`` are converted to lists.\n* Numbers are converted either to ``int`` or ``float``, whichever is more\n appropriate.\n* Boolean values are converted to ``bool``.\n\nThe following can be used to convert a Python dictionary into its textual\nrepresentation:\n\n.. code-block:: python\n\n users = {\n \"peter\": {\n \"uid\": 1000,\n \"name\": \"Peter J\u00f8glund\",\n \"groups\": [\"wheel\", \"peter\"],\n },\n \"root\": {\n \"uid\": 0,\n \"groups\": [\"root\"],\n }\n }\n\n import hipack\n text = hipack.dumps(users)\n\nWhen generating a textual representation, the keys of each dictionary will\nbe sorted, to guarantee that the generated output is stable. The dictionary\nfrom the previous snippet would be written in text form as follows:\n\n.. code-block::\n\n peter: {\n name: \"Peter J\u00f8glund\"\n groups: [\"wheel\" \"peter\"]\n uid: 1000\n }\n root: {\n groups: [\"root\"]\n uid: 0\n }\n\n\nInstallation\n============\n\nThe stable releases are uploaded to `PyPI `_, so you\ncan install them and upgrade using ``pip``::\n\n pip install hipack\n\nAlternatively, you can install development versions \u2014at your own risk\u2014\ndirectly from the Git repository::\n\n pip install -e git://github.com/aperezdc/hipack-python\n\n\nDevelopment\n===========\n\nIf you want to contribute, please use the usual GitHub workflow:\n\n1. Clone the repository.\n2. Hack on your clone.\n3. Send a pull request for review.\n\nIf you do not have programming skills, you can still contribute by `reporting\nissues `_ that you may\nencounter.", "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/aperezdc/hipack-python", "keywords": null, "license": "Dual GPL3 / MIT", "maintainer": null, "maintainer_email": null, "name": "hipack", "package_url": "https://pypi.org/project/hipack/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/hipack/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/aperezdc/hipack-python" }, "release_url": "https://pypi.org/project/hipack/13/", "requires_dist": null, "requires_python": null, "summary": "Serialization library or the HiPack interchange format", "version": "13" }, "last_serial": 2017656, "releases": { "10": [ { "comment_text": "", "digests": { "md5": "1267a59059becddaf8efcf0fff9850c7", "sha256": "4fdd7ce3fee622e9cbd688fa8de979ad19bc6e688a8601ef6eccab7fb4fe76fc" }, "downloads": -1, "filename": "hipack-10.tar.gz", "has_sig": false, "md5_digest": "1267a59059becddaf8efcf0fff9850c7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19662, "upload_time": "2015-11-27T21:05:56", "url": "https://files.pythonhosted.org/packages/81/21/f13e18b8237131b28d074bd72ac78a943d23c988f6390e799466fbeb6004/hipack-10.tar.gz" } ], "12": [ { "comment_text": "", "digests": { "md5": "8be96ed042ad6e5e5920df415e401634", "sha256": "977432830c973bfb928eff08764fa2b5f94a696ad45394c6ab01f25d5e802932" }, "downloads": -1, "filename": "hipack-12.tar.gz", "has_sig": false, "md5_digest": "8be96ed042ad6e5e5920df415e401634", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20220, "upload_time": "2015-12-03T15:07:38", "url": "https://files.pythonhosted.org/packages/af/76/342b5ac7e8c2ad2af6cfe1a4de96122ecada133144f08c68c85fb409c6c3/hipack-12.tar.gz" } ], "13": [ { "comment_text": "", "digests": { "md5": "02efc3cfb1396c3bd8838c5083c29b07", "sha256": "8242437a42ee7a7344ba88cf9cf59d8fdf6c9eb929e960006e5960d7f8318f29" }, "downloads": -1, "filename": "hipack-13.tar.gz", "has_sig": false, "md5_digest": "02efc3cfb1396c3bd8838c5083c29b07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16637, "upload_time": "2016-03-20T23:36:05", "url": "https://files.pythonhosted.org/packages/5e/ed/b1ff9fc3ad622b48a10162dd29cdf843b88b20ed89b424a7f7c0be756049/hipack-13.tar.gz" } ], "7": [ { "comment_text": "", "digests": { "md5": "53ac865341b2a8ca015a3d55c450b5cf", "sha256": "28b2ca3b0c92f488f75e4b43f2330681e6a7b4a7bb45bbdfb5c20cc25314c589" }, "downloads": -1, "filename": "hipack-7.tar.gz", "has_sig": false, "md5_digest": "53ac865341b2a8ca015a3d55c450b5cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12623, "upload_time": "2015-07-23T15:03:05", "url": "https://files.pythonhosted.org/packages/38/f7/bac38121ef900547d8705b1fe7982142eb88650b309033dfe0b7b60bd665/hipack-7.tar.gz" } ], "8": [ { "comment_text": "", "digests": { "md5": "3bb7c2d9b8dacce34ca26f3597d6a6f4", "sha256": "b04ae7a3df1c79c0d88361c27bc3f49ea63620ea72a22955e1bc22eb4ebbc174" }, "downloads": -1, "filename": "hipack-8.tar.gz", "has_sig": false, "md5_digest": "3bb7c2d9b8dacce34ca26f3597d6a6f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13719, "upload_time": "2015-07-23T16:34:39", "url": "https://files.pythonhosted.org/packages/15/62/2a162fc9145d500a1fd2d56d68af62a031244a97ed1d2c403fecb04a7072/hipack-8.tar.gz" } ], "9": [ { "comment_text": "", "digests": { "md5": "52d43cc25382d75496799f86c6a6d2da", "sha256": "dc96ec99a6700dbc824b251a5b70206faf9319b4b40503307b1f3be9e797362a" }, "downloads": -1, "filename": "hipack-9.tar.gz", "has_sig": false, "md5_digest": "52d43cc25382d75496799f86c6a6d2da", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14283, "upload_time": "2015-07-26T21:59:16", "url": "https://files.pythonhosted.org/packages/a7/d6/4926b2aff4ff4a252268910b1f0aa4c80a968d675464ddcc31c04cd4b23d/hipack-9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "02efc3cfb1396c3bd8838c5083c29b07", "sha256": "8242437a42ee7a7344ba88cf9cf59d8fdf6c9eb929e960006e5960d7f8318f29" }, "downloads": -1, "filename": "hipack-13.tar.gz", "has_sig": false, "md5_digest": "02efc3cfb1396c3bd8838c5083c29b07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16637, "upload_time": "2016-03-20T23:36:05", "url": "https://files.pythonhosted.org/packages/5e/ed/b1ff9fc3ad622b48a10162dd29cdf843b88b20ed89b424a7f7c0be756049/hipack-13.tar.gz" } ] }