{ "info": { "author": "darkdarkfruit", "author_email": "darkdarkfruit@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "python-weed. What is it?\n========================\n\nA python module for seaweedfs(https://github.com/chrislusf/seaweedfs.git)\n(Old name is: weed-fs (https://code.google.com/p/weed-fs/)).\n\n\nPython version\n===============\nCurrently, python2.7\n\n\nInstall\n=======\n\n pip install python-weed\n\nOr if you want the latest version:\n\n pip install https://github.com/darkdarkfruit/python-weed/archive/master.zip\n\n\nTest\n====\n # Download weedfs(https://github.com/chrislusf/seaweedfs.git) binary and install it.\n\n # Start weedfs servers: master server, volume server, filer server.\n > weed master # start master server in terminal 1\n > weed volume -port=27000 # start volume server in terminal 2\n > weed filer -port=27100 # start filer server in terminal 3\n\n # start testing python-weed.\n > pip2 install pytest\n > pytest test/\n \n \n# Build\n > python=python2 make sdist \n \n\n\nShortely\n========\n\nWeed-FS is a simple and highly scalable distributed file system. There are two\nobjectives:\n\n* to store billions of files!\n* to serve the files fast! \n\nInstead of supporting full POSIX file system semantics, Weed-FS choose to\nimplement only a key-file mapping. Similar to the word \"NoSQL\", you can call it\nas \"NoFS\". see detail in (https://code.google.com/p/weed-fs/)\n\nAnd this is a python module for weed-fs.\n\nUsage (sample)\n===============\n\n::\n\n #----------------------------------------------------------- \n In [1]: from weed.master import WeedMaster\n \n In [2]: master = WeedMaster()\n\n In [3]: master\n Out[3]: \n\n In [4]: master.\n master.get_assign_key master.lookup master.url_base master.url_vacuum \n master.get_status master.port master.url_lookup master.vacuum \n master.host master.url_assign master.url_status \n\n In [4]: master.get_assign_key()\n Out[4]: \n {u'count': 1,\n u'fid': u'4,024a042190cca9',\n u'publicUrl': u'127.0.0.1:8080',\n u'url': u'127.0.0.1:8080'}\n\n In [5]: master.lookup('4')\n Out[5]: {u'locations': [{u'publicUrl': u'127.0.0.1:8080', u'url': u'127.0.0.1:8080'}]}\n\n In [6]: master.get_status()\n Out[6]: \n {u'Topology': {u'DataCenters': [{u'Free': 93,\n u'Max': 100,\n u'Racks': [{u'DataNodes': [{u'Free': 93,\n u'Max': 100,\n u'PublicUrl': u'127.0.0.1:8080',\n u'Url': u'127.0.0.1:8080',\n u'Volumes': 7}],\n u'Free': 93,\n u'Max': 100}]}],\n u'Free': 93,\n u'Max': 100,\n u'layouts': [{u'replication': u'000', u'writables': [2, 3, 5, 6, 7, 1, 4]}]},\n u'Version': u'0.37'}\n\n In [7]: volume = master.get_volume()\n\n In [8]: volume\n Out[8]: \n\n In [9]: volume.get_status()\n Out[9]: \n {u'Version': u'0.37',\n u'Volumes': [{u'DeleteCount': 0,\n u'DeletedByteCount': 0,\n u'FileCount': 1,\n u'Id': 1,\n u'ReadOnly': False,\n u'RepType': u'000',\n u'Size': 126481,\n u'Version': 2},\n {u'DeleteCount': 0,\n u'DeletedByteCount': 0,\n u'FileCount': 0,\n u'Id': 2,\n u'ReadOnly': False,\n u'RepType': u'000',\n u'Size': 0,\n u'Version': 2},\n {u'DeleteCount': 0,\n u'DeletedByteCount': 0,\n u'FileCount': 2,\n u'Id': 3,\n u'ReadOnly': False,\n u'RepType': u'000',\n u'Size': 438228,\n u'Version': 2},\n {u'DeleteCount': 0,\n u'DeletedByteCount': 0,\n u'FileCount': 0,\n u'Id': 4,\n u'ReadOnly': False,\n u'RepType': u'000',\n u'Size': 0,\n u'Version': 2},\n {u'DeleteCount': 0,\n u'DeletedByteCount': 0,\n u'FileCount': 0,\n u'Id': 5,\n u'ReadOnly': False,\n u'RepType': u'000',\n u'Size': 0,\n u'Version': 2},\n {u'DeleteCount': 0,\n u'DeletedByteCount': 0,\n u'FileCount': 0,\n u'Id': 6,\n u'ReadOnly': False,\n u'RepType': u'000',\n u'Size': 0,\n u'Version': 2},\n {u'DeleteCount': 0,\n u'DeletedByteCount': 0,\n u'FileCount': 0,\n u'Id': 7,\n u'ReadOnly': False,\n u'RepType': u'000',\n u'Size': 0,\n u'Version': 2}]}\n #----------------------------------------------------------- \n\n\n\n #----------------------------------------------------------- \n def omit_printing_content(d):\n ''' not showing large content on content '''\n for k,v in d.items():\n _v = v\n if k == 'content' and v and len(v) > 10:\n _v = v[:10] + '...(comment: size: %d, only show: 10). ' % len(v)\n print(k,_v)\n\n from weed import operation\n wo = operation.WeedOperation()\n \n # put\n wor = wo.put('1.txt')\n print(wor)\n \n # get\n wor = wo.get(wor.fid)\n def omit_printing_content(d):\n for k,v in d.items():\n _v = v\n if k == 'content' and v and len(v) > 10:\n _v = v[:10] + '...(comment: size: %d, only show: 10). ' % len(v)\n print(k,_v)\n omit_printing_content(wor)\n \n # delete\n wor = wo.delete(wor.fid)\n print(wor)\n #----------------------------------------------------------- \n \n\n #----------------------------------------------------------- \n # crud aliases\n wop = operation.WeedOperation()\n #\n # create\n wor = wop.crud_create('1.txt')\n print(wor)\n \n # read\n wor = wop.crud_read(wor.fid)\n omit_printing_content(wor)\n \n # update\n wor = wop.crud_update('1.jpg', wor.fid)\n print(wor)\n wor = wop.crud_get(wor.fid)\n wor = wop.crud_read(wor.fid)\n omit_printing_content(wor)\n \n # delete\n wor = wop.delete(wor.fid)\n print(wor)\n #----------------------------------------------------------- \n\n\n #----------------------------------------------------------- \n # filer\n from weed import filer\n wf = filer.WeedFiler()\n \n # put\n f = wf.put('1.txt')\n f = wf.put('1.txt', '/helloworld/')\n print(f)\n \n # get\n f_get = wf.get('/helloworld/1.txt')\n print(f_get)\n omit_printing_content(f_get)\n \n # delete\n f_delete = wf.delete('/helloworld/1.txt')\n print(f_delete)\n #-----------------------------------------------------------", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/darkdarkfruit/python-weed", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "python-weed", "package_url": "https://pypi.org/project/python-weed/", "platform": "any", "project_url": "https://pypi.org/project/python-weed/", "project_urls": { "Homepage": "https://github.com/darkdarkfruit/python-weed" }, "release_url": "https://pypi.org/project/python-weed/0.2.3/", "requires_dist": null, "requires_python": "", "summary": "A python module for weed-fs", "version": "0.2.3" }, "last_serial": 3382388, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "7664e0d7271f3d85f3ccca99a7c0def5", "sha256": "b35a1fea29983623725e185f55a9a55a03c9238ccfb7012ea2037c6c3c296962" }, "downloads": -1, "filename": "python-weed-0.0.1.tar.gz", "has_sig": false, "md5_digest": "7664e0d7271f3d85f3ccca99a7c0def5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 147304, "upload_time": "2013-08-06T15:16:22", "url": "https://files.pythonhosted.org/packages/b5/30/3548d623c6fa2529cdf4b38b66f0626abf0a5a68427bc504def397632683/python-weed-0.0.1.tar.gz" } ], "0.1": [ { "comment_text": "", "digests": { "md5": "63e58f4f56d50e152bab5533886c34ea", "sha256": "07caa374a82cb8bb743ae49fa33860d8804c11bc19b221675658d902d2a1c6b6" }, "downloads": -1, "filename": "python-weed-0.1.tar.gz", "has_sig": false, "md5_digest": "63e58f4f56d50e152bab5533886c34ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 158053, "upload_time": "2014-04-09T06:00:22", "url": "https://files.pythonhosted.org/packages/b6/38/0a15984d1955ca575e9e7a39d25c64f9687feda3adfdc60c9671690c3576/python-weed-0.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "9b945668eb7b202deb507d5c9dd66957", "sha256": "1cc09c457c93886889d2968e23eedd6970b9837d010ea93e6f9249957d594157" }, "downloads": -1, "filename": "python-weed-0.1.2.tar.gz", "has_sig": false, "md5_digest": "9b945668eb7b202deb507d5c9dd66957", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 155794, "upload_time": "2014-04-09T09:38:59", "url": "https://files.pythonhosted.org/packages/0a/ab/97e56c3ee9587a860b9c5f006eebbdccc7298c222da9882dfda1699f14f5/python-weed-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "b32dc5a82bde856a759fc8c7d3c1f69e", "sha256": "5dae0ec0c6c1561fbbe19c99dd244d31f701d1fd621e4bf7f986ee0eaa4a63f2" }, "downloads": -1, "filename": "python-weed-0.1.3.tar.gz", "has_sig": false, "md5_digest": "b32dc5a82bde856a759fc8c7d3c1f69e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 158023, "upload_time": "2014-04-17T14:59:25", "url": "https://files.pythonhosted.org/packages/ed/17/7c8fd0f61d2088b1325f1ed523ea174d57058efaa7261dea3744dad4072a/python-weed-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "81b62e960752cb7a8a4e13c6c9b87107", "sha256": "9577c08a16d3484a633852b1f50b89b8f2fce3c51cb350ba15e6d82b41351375" }, "downloads": -1, "filename": "python-weed-0.1.4.tar.gz", "has_sig": false, "md5_digest": "81b62e960752cb7a8a4e13c6c9b87107", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 158271, "upload_time": "2014-04-22T03:36:07", "url": "https://files.pythonhosted.org/packages/89/ee/18bc34e2a58e5cf502525452b6ae1ab7d0ba23a03bfdad8959dd1da8714f/python-weed-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "67114423cadff1e9ac39b260e72909af", "sha256": "77a5958f4efc6b1f2312dd8c12497981140e2123c184a2f83c9f40ea4bf0b7a0" }, "downloads": -1, "filename": "python-weed-0.1.5.tar.gz", "has_sig": false, "md5_digest": "67114423cadff1e9ac39b260e72909af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 158951, "upload_time": "2014-05-06T02:04:35", "url": "https://files.pythonhosted.org/packages/85/06/c6dde60e3a8121e31df5163061e97a73373d2cc25a152383788830ff8db8/python-weed-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "7b1159cf211b262b0ef0a31f4426a2fb", "sha256": "b70daa7716ba130b437b55bd86105b2c9869c6cea8da05c62b39bced273cb2db" }, "downloads": -1, "filename": "python-weed-0.1.6.tar.gz", "has_sig": false, "md5_digest": "7b1159cf211b262b0ef0a31f4426a2fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 160397, "upload_time": "2014-05-06T04:16:41", "url": "https://files.pythonhosted.org/packages/ae/2b/3c4852800d970982310366b4001d71c91ed653266dd43f1d0389fc5d0f33/python-weed-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "0dd942d99a64c00774bb3ca6b81fc97d", "sha256": "22239f77de6753b1ef894988d787e0ec7efd34e2c39b473daef994cc4d951307" }, "downloads": -1, "filename": "python-weed-0.1.7.tar.gz", "has_sig": false, "md5_digest": "0dd942d99a64c00774bb3ca6b81fc97d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 160921, "upload_time": "2014-05-29T09:42:27", "url": "https://files.pythonhosted.org/packages/c9/a8/4af07de6b2f3c3aba75cc2d99715b1917145b5482d20323f52b967e0f46b/python-weed-0.1.7.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "4aaba1ac55099bbe661df6e4911f157f", "sha256": "b1ac5e35853ea385a1ff1307c606a62316af00120a03964f2472f69ac188b467" }, "downloads": -1, "filename": "python-weed-0.2.1.tar.gz", "has_sig": false, "md5_digest": "4aaba1ac55099bbe661df6e4911f157f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 161935, "upload_time": "2017-12-02T11:12:15", "url": "https://files.pythonhosted.org/packages/43/5d/9d2bebf7288acc4861a69381d84e68d7af2f39c3b4c9cb3ac401a1d6ab3b/python-weed-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "091559663e38afb98fdef05f7e55e759", "sha256": "262656f4fbf81319846bdb3baea93cd23228b4e9380b5d587f5ae6d927c9f6e5" }, "downloads": -1, "filename": "python-weed-0.2.2.tar.gz", "has_sig": false, "md5_digest": "091559663e38afb98fdef05f7e55e759", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 161932, "upload_time": "2017-12-02T11:15:27", "url": "https://files.pythonhosted.org/packages/70/0a/024022c3e28950a592a39a1c972db505e2734edeea6c817fcefbaf671c3a/python-weed-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "378682b5a8363a354b330fc812484d18", "sha256": "a02a1c60a2754ce3a99d4028496ed0da7dc737ec90124183d454fcc5104f6622" }, "downloads": -1, "filename": "python-weed-0.2.3.tar.gz", "has_sig": false, "md5_digest": "378682b5a8363a354b330fc812484d18", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 161933, "upload_time": "2017-12-02T11:17:22", "url": "https://files.pythonhosted.org/packages/4e/e1/ae5fc1fa631b7dc7a687a379c68a2036fb20b920689d9b4d379878a85e06/python-weed-0.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "378682b5a8363a354b330fc812484d18", "sha256": "a02a1c60a2754ce3a99d4028496ed0da7dc737ec90124183d454fcc5104f6622" }, "downloads": -1, "filename": "python-weed-0.2.3.tar.gz", "has_sig": false, "md5_digest": "378682b5a8363a354b330fc812484d18", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 161933, "upload_time": "2017-12-02T11:17:22", "url": "https://files.pythonhosted.org/packages/4e/e1/ae5fc1fa631b7dc7a687a379c68a2036fb20b920689d9b4d379878a85e06/python-weed-0.2.3.tar.gz" } ] }