{ "info": { "author": "Silvio Ankermann", "author_email": "silvio@booq.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# AnnexRemote\nHelper module to easily develop special remotes for [git annex](https://git-annex.branchable.com).\nAnnexRemote handles all the protocol stuff for you, so you can focus on the remote itself.\nIt implements the complete [external special remote protocol](https://git-annex.branchable.com/design/external_special_remote_protocol)\nand fulfils all specifications regarding whitespaces etc. This is ensured by an excessive test suite.\nExtensions to the protocol are normally added within hours after they've been published.\n\n## Getting started\n### Prerequisites\nYou need python installed on your system. AnnexRemote has been tested with version 2.7 and 3.4 to 3.7.\n\n### Installing\n`pip install annexremote`\n\n### Running the tests\nIf you want to run the tests, copy the content of the `tests` folder to the same location as `annexremote.py`.\nThen use a test discovery like [nose](http://nose.readthedocs.io) to run them.\n\n### Usage\n\nImport the necessary classes\n\n```\nfrom annexremote import Master\nfrom annexremote import SpecialRemote\nfrom annexremote import RemoteError\n```\n\nNow create your special remote class. It must subtype ``SpecialRemote`` and implement at least the 6 basic methods:\n\n```\nclass MyRemote(SpecialRemote):\n def initremote(self):\n # initialize the remote, eg. create the folders\n # raise RemoteError if the remote couldn't be initialized\n\n def prepare(self):\n # prepare to be used, eg. open TCP connection, authenticate with the server etc.\n # raise RemoteError if not ready to use\n\n def transfer_store(self, key, filename):\n # store the file in `filename` to a unique location derived from `key`\n # raise RemoteError if the file couldn't be stored\n\n def transfer_retrieve(self, key, filename):\n # get the file identified by `key` and store it to `filename`\n # raise RemoteError if the file couldn't be retrieved\n\n def checkpresent(self, key):\n # return True if the key is present in the remote\n # return False if the key is not present\n # raise RemoteError if the presence of the key couldn't be determined, eg. in case of connection error\n\n def remove(self, key):\n # remove the key from the remote\n # raise RemoteError if it couldn't be removed\n # note that removing a not existing key isn't considered an error\n```\n\nIn your ``main`` function, link your remote to the master class and initialize the protocol:\n\n```\ndef main():\n master = Master()\n remote = MyRemote(master)\n master.LinkRemote(remote)\n master.Listen()\n\nif __name__ == \"__main__\":\n main()\n```\n\nNow save your program as ``git-annex-remote-$something`` and make it executable.\n\n``chmod +x git-annex-remote-$something``\n(You'll need the sheebang line ``#!/usr/bin/env python3``)\n\nThat's it. Now you've created your special remote.\n\n#### Export remotes\nImport and subtype `ExportRemote` instead of `SpecialRemote`:\n\n```\n# ...\nfrom annexremote import ExportRemote\n\nclass MyRemote(ExportRemote):\n # implement the remote methods just like in the above example and then additionally:\n\n def transferexport_store(self, key, local_file, remote_file):\n # store the file located at `local_file` to `remote_file` on the remote\n # raise RemoteError if the file couldn't be stored\n\n def transferexport_retrieve(self, key, local_file, remote_file):\n # get the file located at `remote_file` from the remote and store it to `local_file`\n # raise RemoteError if the file couldn't be retrieved\n\n def checkpresentexport(self, key, remote_file):\n # return True if the file `remote_file` is present in the remote\n # return False if not\n # raise RemoteError if the presence of the file couldn't be determined, eg. in case of connection error\n\n def removeexport(self, key, remote_file):\n # remove the file in `remote_file` from the remote\n # raise RemoteError if it couldn't be removed\n # note that removing a not existing key isn't considered an error\n\n def removeexportdirectory(self, remote_directory):\n # remove the directory `remote_directory` from the remote\n # raise RemoteError if it couldn't be removed\n # note that removing a not existing directory isn't considered an error\n\n def renameexport(self, key, filename, new_filename):\n # move the remote file in `name` to `new_name`\n # raise RemoteError if it couldn't be moved\n\n```\n\n#### Documentation\nA full documentation is being worked on. Until then, have a look at the [example](examples) and check the test cases in order to see how the other methods are used. Also have a look at [git-annex-remote-googledrive](https://github.com/Lykos153/git-annex-remote-googledrive) which is based on AnnexRemote.\n\n## License\n\nThis project is licensed under GPLv3 - see the [LICENSE](LICENSE) file for details\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Lykos153/AnnexRemote", "keywords": "git-annex remote", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "annexremote", "package_url": "https://pypi.org/project/annexremote/", "platform": "", "project_url": "https://pypi.org/project/annexremote/", "project_urls": { "Homepage": "https://github.com/Lykos153/AnnexRemote" }, "release_url": "https://pypi.org/project/annexremote/1.3.1/", "requires_dist": [ "future", "coverage ; extra == 'test'", "nose ; extra == 'test'", "mock ; extra == 'test'" ], "requires_python": "", "summary": "git annex special remotes made easy", "version": "1.3.1" }, "last_serial": 4700677, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "08b8e2ed55999984e8c3a330fb7f014c", "sha256": "3b17db1ec1013c2e8c96401c7b04c5de93bf24e5ba9636d02129eb87a99e1d0a" }, "downloads": -1, "filename": "annexremote-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "08b8e2ed55999984e8c3a330fb7f014c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6136, "upload_time": "2018-03-10T21:52:16", "url": "https://files.pythonhosted.org/packages/e1/c6/9d76e55de642b07d55a8b83077dca5adf379154ed5b177e05147da27ae0e/annexremote-1.0.1-py3-none-any.whl" } ], "1.0.post2": [ { "comment_text": "", "digests": { "md5": "b413d22cd468f2f2ff19bc6687363d07", "sha256": "0931fceb0c2ca85a08b8f2b88078439382e3e63607801bfab6fca62ec353a248" }, "downloads": -1, "filename": "annexremote-1.0.post2-py3-none-any.whl", "has_sig": false, "md5_digest": "b413d22cd468f2f2ff19bc6687363d07", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6187, "upload_time": "2018-03-10T16:54:05", "url": "https://files.pythonhosted.org/packages/88/a4/7580817c877dc425959b0399641a067c140eeea453e3583971b5c1f9f656/annexremote-1.0.post2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "04fa5cc557c0ed0e062bd4a8f261ef18", "sha256": "87eb9ba4eba4244ee450828a35719571f771dacda5d8b0ccad7bf37338c19f0a" }, "downloads": -1, "filename": "annexremote-1.0.post2.tar.gz", "has_sig": false, "md5_digest": "04fa5cc557c0ed0e062bd4a8f261ef18", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5879, "upload_time": "2018-03-10T16:57:04", "url": "https://files.pythonhosted.org/packages/a4/c0/b20c623bfeacbc41e49c71644baa610bcc2a345e47c5951093766f9e59c7/annexremote-1.0.post2.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "f3f868185d2c62959eb95c88360e0f84", "sha256": "d95ec9b2939c8e4559b99e9764971d63b74123a63766eaab38ef1f324b969f36" }, "downloads": -1, "filename": "annexremote-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f3f868185d2c62959eb95c88360e0f84", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6249, "upload_time": "2018-03-15T15:26:48", "url": "https://files.pythonhosted.org/packages/b4/7b/c925c227a9b0ef80b5c734582994a5e1d2be38dab3612a8b47ccb4c55aed/annexremote-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c41ac66aadfff766a99f488b4736e012", "sha256": "c3177ed5329ce6672411f5c5937aacb47eb3ff81f5ea6e1294bcf00bb66c7840" }, "downloads": -1, "filename": "annexremote-1.1.0.tar.gz", "has_sig": false, "md5_digest": "c41ac66aadfff766a99f488b4736e012", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5835, "upload_time": "2018-03-15T15:26:49", "url": "https://files.pythonhosted.org/packages/f8/7e/60a2ffe77ad61c571ab40aee5e0979c4e5925c213eb72946e2fa71add27b/annexremote-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "d13fe90b3e09569d4e02bf1bff13cd3e", "sha256": "bd014fff8c5d3aaef53d2f9e383bd0ff941940e77f01c8e1c375eb19522f4919" }, "downloads": -1, "filename": "annexremote-1.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "d13fe90b3e09569d4e02bf1bff13cd3e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9359, "upload_time": "2018-03-28T20:05:59", "url": "https://files.pythonhosted.org/packages/40/82/3c8fd569fa49e78588521b4029e02a633907615c163b1a2365e96752bb32/annexremote-1.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9cd5ab407327ff4d9c6bf58ac7111012", "sha256": "391ded47f5e1986304baf6c282b0213f1c448dcba87e05541f30888fe9ee1136" }, "downloads": -1, "filename": "annexremote-1.1.1.tar.gz", "has_sig": false, "md5_digest": "9cd5ab407327ff4d9c6bf58ac7111012", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24074, "upload_time": "2018-03-28T20:06:00", "url": "https://files.pythonhosted.org/packages/f0/28/6628f80b47389f0ea7ec83375f4a7587419570870257ec5b9f27958569aa/annexremote-1.1.1.tar.gz" } ], "1.1.post1": [ { "comment_text": "", "digests": { "md5": "b5a9b9887e1d33cdd92298fe6fa283f6", "sha256": "6717d6bd9c082daae573f3a3d23300989588c200833b8103e2b23b2b8ca93a8d" }, "downloads": -1, "filename": "annexremote-1.1.post1.tar.gz", "has_sig": false, "md5_digest": "b5a9b9887e1d33cdd92298fe6fa283f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24019, "upload_time": "2018-03-26T13:51:30", "url": "https://files.pythonhosted.org/packages/8f/7f/fcc0d764692a092dc3dbb077710c8ce65901043755f37a63a89c566e12f4/annexremote-1.1.post1.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "1b6e01586a52907040a324e40882188a", "sha256": "154445f0d42b34190fbf40124c0d21d52b7f253c18f4908a7cf36795ba4c1d8a" }, "downloads": -1, "filename": "annexremote-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "1b6e01586a52907040a324e40882188a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7408, "upload_time": "2018-06-28T23:23:59", "url": "https://files.pythonhosted.org/packages/b3/ec/6990cad4915cdd4f8419b7583f55e4ebc456fc01043e8f5dbbb2bd4750ee/annexremote-1.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "51740470426d9faee88dd54742110d6f", "sha256": "2be77ae9b9edd0d2818ab6dff7070a05aed2fcc1e5065638aa03eba991b67f17" }, "downloads": -1, "filename": "annexremote-1.2.0.tar.gz", "has_sig": false, "md5_digest": "51740470426d9faee88dd54742110d6f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24756, "upload_time": "2018-06-28T23:24:00", "url": "https://files.pythonhosted.org/packages/ac/5c/76535d41620ee6f541880ce6c16947eee17973ebc7d4b386e73b8e3498fe/annexremote-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "56a6b9567780e36bbd01aae22db84803", "sha256": "b7fbfde240cbcc10d492c9ae3502151895587175c9a90f23d7e2f5540f248318" }, "downloads": -1, "filename": "annexremote-1.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "56a6b9567780e36bbd01aae22db84803", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19713, "upload_time": "2019-01-07T20:32:37", "url": "https://files.pythonhosted.org/packages/e7/b2/452503d1e112235c987a11f8fc54906bee859ba9b3ea3188bde79fc247d8/annexremote-1.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e5d487d2d18c7dd868b98edd1b5370c4", "sha256": "2db60f428999fe2ad9a18c03feb94829ec88144279cb5630b77d62138cff3511" }, "downloads": -1, "filename": "annexremote-1.2.1.tar.gz", "has_sig": false, "md5_digest": "e5d487d2d18c7dd868b98edd1b5370c4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23410, "upload_time": "2019-01-07T20:32:39", "url": "https://files.pythonhosted.org/packages/96/34/ff4e7f3bcac6df2d7693b451b5a81cf9887610c8cf02a51750bed76eac72/annexremote-1.2.1.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "ef98127efa80bd85a61d632de86d07f3", "sha256": "8228a3d80310ca3aa0a75313402658d06c2169a9c9538a7ed93116b2e4cbce10" }, "downloads": -1, "filename": "annexremote-1.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ef98127efa80bd85a61d632de86d07f3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19944, "upload_time": "2019-01-14T22:58:39", "url": "https://files.pythonhosted.org/packages/0c/8e/96cc871200bab00ce4f84d631ce323c72cc6538d5fd330695b063f599a7c/annexremote-1.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e7fd0af14f6335c99b3a50151886e238", "sha256": "16b5931bedbccec62cb9acaf97ab8a6e713ac504064d8cb23e3e71744cf54ea0" }, "downloads": -1, "filename": "annexremote-1.3.0.tar.gz", "has_sig": false, "md5_digest": "e7fd0af14f6335c99b3a50151886e238", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23655, "upload_time": "2019-01-14T22:58:40", "url": "https://files.pythonhosted.org/packages/79/0b/0a2f22e0dbc3ff012e278e84b104843961a4a5b59d72045d93e98745b79e/annexremote-1.3.0.tar.gz" } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "14a8ea4771cbd75b421976b01df21c2d", "sha256": "3265cebfa07bad3357d1abccab74b68c46d1ec6d025d22e506716397f334d2d8" }, "downloads": -1, "filename": "annexremote-1.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "14a8ea4771cbd75b421976b01df21c2d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19939, "upload_time": "2019-01-15T22:13:08", "url": "https://files.pythonhosted.org/packages/e4/67/ae5821eae1d79524e1dcd1b4bf0338398ffb15f2ec4af79d731b0bfddadb/annexremote-1.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "71f403f482106147cb306e6d64697fad", "sha256": "058d39fd59db165f0014601da1ba9ecde7614de87eef3061e9ea0b1dd096a9cd" }, "downloads": -1, "filename": "annexremote-1.3.1.tar.gz", "has_sig": false, "md5_digest": "71f403f482106147cb306e6d64697fad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23660, "upload_time": "2019-01-15T22:13:10", "url": "https://files.pythonhosted.org/packages/b4/43/fb8b291869060363170ce9dc9c3ab484660bd2b8bdb255ae9e46a872d045/annexremote-1.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "14a8ea4771cbd75b421976b01df21c2d", "sha256": "3265cebfa07bad3357d1abccab74b68c46d1ec6d025d22e506716397f334d2d8" }, "downloads": -1, "filename": "annexremote-1.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "14a8ea4771cbd75b421976b01df21c2d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19939, "upload_time": "2019-01-15T22:13:08", "url": "https://files.pythonhosted.org/packages/e4/67/ae5821eae1d79524e1dcd1b4bf0338398ffb15f2ec4af79d731b0bfddadb/annexremote-1.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "71f403f482106147cb306e6d64697fad", "sha256": "058d39fd59db165f0014601da1ba9ecde7614de87eef3061e9ea0b1dd096a9cd" }, "downloads": -1, "filename": "annexremote-1.3.1.tar.gz", "has_sig": false, "md5_digest": "71f403f482106147cb306e6d64697fad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23660, "upload_time": "2019-01-15T22:13:10", "url": "https://files.pythonhosted.org/packages/b4/43/fb8b291869060363170ce9dc9c3ab484660bd2b8bdb255ae9e46a872d045/annexremote-1.3.1.tar.gz" } ] }