{ "info": { "author": "Ryan Kelly", "author_email": "ryan@rfk.id.au", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2" ], "description": "tnetstring: data serialization using typed netstrings\n======================================================\n\n\nThis is a data serialization library. It's a lot like JSON but it uses a\nnew syntax called \"typed netstrings\" that Zed has proposed for use in the\nMongrel2 webserver. It's designed to be simpler and easier to implement\nthan JSON, with a happy consequence of also being faster in many cases.\n\nAn ordinary netstring is a blob of data prefixed with its length and postfixed\nwith a sanity-checking comma. The string \"hello world\" encodes like this::\n\n 11:hello world,\n\nTyped netstrings add other datatypes by replacing the comma with a type tag.\nHere's the integer 12345 encoded as a tnetstring::\n\n 5:12345#\n\nAnd here's the list [12345,True,0] which mixes integers and bools::\n\n 19:5:12345#4:true!1:0#]\n\nSimple enough? This module gives you the following functions:\n\n :dump: dump an object as a tnetstring to a file\n :dumps: dump an object as a tnetstring to a string\n :load: load a tnetstring-encoded object from a file\n :loads: load a tnetstring-encoded object from a string\n :pop: pop a tnetstring-encoded object from the front of a string\n\nNote that since parsing a tnetstring requires reading all the data into memory\nat once, there's no efficiency gain from using the file-based versions of these\nfunctions. They're only here so you can use load() to read precisely one\nitem from a file or socket without consuming any extra data.\n\nThe tnetstrings specification explicitly states that strings are binary blobs\nand forbids the use of unicode at the protocol level. As a convenience to\npython programmers, this library lets you specify an application-level encoding\nto translate python's unicode strings to and from binary blobs:\n\n >>> print repr(tnetstring.loads(\"2:\\xce\\xb1,\"))\n '\\xce\\xb1'\n >>> \n >>> print repr(tnetstring.loads(\"2:\\xce\\xb1,\", \"utf8\"))\n u'\\u03b1'", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/rfk/tnetstring", "keywords": "netstring serialize", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "tnetstring", "package_url": "https://pypi.org/project/tnetstring/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/tnetstring/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/rfk/tnetstring" }, "release_url": "https://pypi.org/project/tnetstring/0.2.1/", "requires_dist": null, "requires_python": null, "summary": "data serialization using typed netstrings", "version": "0.2.1" }, "last_serial": 800769, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "22d783f5a77fbd11c64c517d7dad7f09", "sha256": "b9b6745b3a0fc5d0e41c6dba0022d2b4ad2289af007df67e68266543080062b1" }, "downloads": -1, "filename": "tnetstring-0.1.0.tar.gz", "has_sig": false, "md5_digest": "22d783f5a77fbd11c64c517d7dad7f09", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15254, "upload_time": "2011-04-06T02:53:59", "url": "https://files.pythonhosted.org/packages/e2/29/e97c966f9f9534554d49567364ebb4f6e6584d97e6761c3e55daacb2c3dc/tnetstring-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "7cc9de42ad5a969630be3cd859282bef", "sha256": "13315c4c7d7b373833971770366786d47c2ce6969b487b0de132e44efff6f5d0" }, "downloads": -1, "filename": "tnetstring-0.2.0.tar.gz", "has_sig": false, "md5_digest": "7cc9de42ad5a969630be3cd859282bef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15451, "upload_time": "2011-05-06T15:47:38", "url": "https://files.pythonhosted.org/packages/71/51/98a0b5689c0928dea1c75d5662bc399e45d3e1725764496c1b1e850eee0d/tnetstring-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "15c2865d2a67538b9f1a88ed0432d235", "sha256": "55715a5d758214034db179005def47ed842da36c4c48e9e7ae59bcaffed7ca9b" }, "downloads": -1, "filename": "tnetstring-0.2.1.tar.gz", "has_sig": false, "md5_digest": "15c2865d2a67538b9f1a88ed0432d235", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16963, "upload_time": "2012-06-05T05:23:04", "url": "https://files.pythonhosted.org/packages/75/19/4b82ac8ff96d99e41f0e7b5544e7128c9c0c661c2f46c1d987f59c10bb19/tnetstring-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "15c2865d2a67538b9f1a88ed0432d235", "sha256": "55715a5d758214034db179005def47ed842da36c4c48e9e7ae59bcaffed7ca9b" }, "downloads": -1, "filename": "tnetstring-0.2.1.tar.gz", "has_sig": false, "md5_digest": "15c2865d2a67538b9f1a88ed0432d235", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16963, "upload_time": "2012-06-05T05:23:04", "url": "https://files.pythonhosted.org/packages/75/19/4b82ac8ff96d99e41f0e7b5544e7128c9c0c661c2f46c1d987f59c10bb19/tnetstring-0.2.1.tar.gz" } ] }