{ "info": { "author": "Matt Walker", "author_email": "walkermatt@longwayaround.org.uk", "bugtrack_url": null, "classifiers": [], "description": "spit slurp\n==========\n\nWrite text to a file with ``spit`` and read from a file with ``slurp``.\n\nBy default files are assumed to be encoded in ``UTF-8``. You can specify an\nalternative encoding via the ``encoding`` keyword argument. For a full list of\nencodings see `Standard Encodings`.\n\n.. _Standard Encodings: https://docs.python.org/2/library/codecs.html#standard-encodings\n\nInstallation\n------------\n\n.. code-block:: console\n\n pip install spitslurp\n\nUsage\n-----\n\n.. code-block:: python\n\n from spitslurp import spit, slurp\n\n txt = u'Hello\\nWorld'\n\n # Write a unicode string to a file, by default encoded as UTF-8 and\n # truncating the file prior to writing\n spit('path/to/file.txt', txt)\n\n txt = u'Hello\\nLatin1'\n\n # Append to a file (if it exists) and specify encoding as Latin 1\n spit('path/to/file.txt', txt, append=True, encoding='latin1')\n\n # Read the entire contents of a file into a unicode string. Assumes the\n # file is in UTF-8 by default\n txt = slurp('path/to/file.txt')\n\n # Specify an encoding\n txt = slurp('path/to/file.txt', encoding='latin1')\n\nTODO\n----\n\n* Moar tests\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/walkermatt/spitslurp/archive/0.4.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/walkermatt/spitslurp", "keywords": "io", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "spitslurp", "package_url": "https://pypi.org/project/spitslurp/", "platform": "", "project_url": "https://pypi.org/project/spitslurp/", "project_urls": { "Download": "https://github.com/walkermatt/spitslurp/archive/0.4.tar.gz", "Homepage": "https://github.com/walkermatt/spitslurp" }, "release_url": "https://pypi.org/project/spitslurp/0.4/", "requires_dist": null, "requires_python": "", "summary": "Write text to a file with `spit` and read from a file with `slurp`.", "version": "0.4" }, "last_serial": 3409619, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "a491416fa4f6f9a2199f262ebffa3d38", "sha256": "4e5c04b846bcef87bbcbc771feb68a1f2aa36c216c3df501d55fcd3ed91e6a8e" }, "downloads": -1, "filename": "spitslurp-0.2.tar.gz", "has_sig": false, "md5_digest": "a491416fa4f6f9a2199f262ebffa3d38", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1520, "upload_time": "2017-12-12T08:10:39", "url": "https://files.pythonhosted.org/packages/cc/52/bbbf6b49c07b77fcb55272e22f6022b4ab3b892d4e5cee8361b6866898a4/spitslurp-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "0385f0b67319c2b7822df9a5e8a906aa", "sha256": "3e8dc8bc7869ed7cb710b59e5dba9f8b54e0b9d70556587b93a2297f2f941f3d" }, "downloads": -1, "filename": "spitslurp-0.3.tar.gz", "has_sig": false, "md5_digest": "0385f0b67319c2b7822df9a5e8a906aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1581, "upload_time": "2017-12-12T08:19:08", "url": "https://files.pythonhosted.org/packages/7f/13/563fc88b97b6391cdace3bcbb987aaec4786571cb117a58f77044c7d46fe/spitslurp-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "462e75a4c0e9ca28ce73bf9bb05b5c3a", "sha256": "1249fc66a4ffc2da15b11bc4c9e41c45519f7fdcbcddf4c0c3137d31d1415103" }, "downloads": -1, "filename": "spitslurp-0.4.tar.gz", "has_sig": false, "md5_digest": "462e75a4c0e9ca28ce73bf9bb05b5c3a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1681, "upload_time": "2017-12-12T08:31:23", "url": "https://files.pythonhosted.org/packages/ae/65/72b918c2672b0ddc048cad6260bca463fc1cff99175913769f9a17251c77/spitslurp-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "462e75a4c0e9ca28ce73bf9bb05b5c3a", "sha256": "1249fc66a4ffc2da15b11bc4c9e41c45519f7fdcbcddf4c0c3137d31d1415103" }, "downloads": -1, "filename": "spitslurp-0.4.tar.gz", "has_sig": false, "md5_digest": "462e75a4c0e9ca28ce73bf9bb05b5c3a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1681, "upload_time": "2017-12-12T08:31:23", "url": "https://files.pythonhosted.org/packages/ae/65/72b918c2672b0ddc048cad6260bca463fc1cff99175913769f9a17251c77/spitslurp-0.4.tar.gz" } ] }