{ "info": { "author": "Andrea Bertoloni", "author_email": "contact@andreabertoloni.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Topic :: System :: Filesystems" ], "description": "Save\n====\n\nA very simple module to *safely* save data to files in python.\n\nWhen you choose a path and a name for the file you want to save your\ndata to, the script checks **if the given file at the given path already\nexist**; if so, **it adds an increasing numbering at the end of the file\nname** (just before the file extension if there is any) untill it finds\na path+name not taken already.\n\nThis prevents from losing data by inadvertently re-writing a file.\n\nInstall\n-------\n\n``$ pip install save``\n\nBasic usage\n-----------\n\n::\n\n from save import save\n\n data = 'Hey there'\n save(data, 'my_file.txt')\n\nThe safe\\_path function\n-----------------------\n\nYou can import the ``safe_path`` submodule to use with other libraries\nor functions. It provides the same functionality as ``save()``.\n(Basically the ``save()`` function itself calls ``safe_path()`` to do\nthe work)\n\nThis is an example involving matplotlib:\n\n::\n\n from matplotlib import pyplot as plt\n from save import safe_path\n\n plt.plot(range(10))\n plt.savefig(safe_path('my_figure.png'))", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ndrbrt/save.py", "keywords": "save data file path system", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "save", "package_url": "https://pypi.org/project/save/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/save/", "project_urls": { "Homepage": "https://github.com/ndrbrt/save.py" }, "release_url": "https://pypi.org/project/save/0.1/", "requires_dist": null, "requires_python": null, "summary": "A very simple module to safely save data to files in python", "version": "0.1" }, "last_serial": 2421850, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "62a1d7b0db88cdb133117fd6af346026", "sha256": "5b93591b8c0b3e37a715eaaf120eecaf9fd7b8580f45f8d018fefa41bb3eb1eb" }, "downloads": -1, "filename": "save-0.1.tar.gz", "has_sig": false, "md5_digest": "62a1d7b0db88cdb133117fd6af346026", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2617, "upload_time": "2016-10-25T12:12:05", "url": "https://files.pythonhosted.org/packages/18/00/4c699e5d2d19712bdb014b1aea3bfaeff757257e6ee9f405a388779735e7/save-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "62a1d7b0db88cdb133117fd6af346026", "sha256": "5b93591b8c0b3e37a715eaaf120eecaf9fd7b8580f45f8d018fefa41bb3eb1eb" }, "downloads": -1, "filename": "save-0.1.tar.gz", "has_sig": false, "md5_digest": "62a1d7b0db88cdb133117fd6af346026", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2617, "upload_time": "2016-10-25T12:12:05", "url": "https://files.pythonhosted.org/packages/18/00/4c699e5d2d19712bdb014b1aea3bfaeff757257e6ee9f405a388779735e7/save-0.1.tar.gz" } ] }