{ "info": { "author": "Cooper Yang", "author_email": "cm_yang@yeah.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Filesystems" ], "description": "pyNfsClient\n===============\n\n.. contents::\n :local:\n\nIntroduction\n------------\n\npyNfsClient is a generic open source toolkit for Linux NFS file system simulation as client.\nConstructed parameters sent via RPC and then analyse the response in reference to NFS protocol specifications (RFC1813).\nYou could form your custom scenarios that consist of basic actions to meet expecations.\n**Currently only NFS v3 supported, NFS v4.1 is under development.**\n\npyNfsClient is operating system and application independent. The toolkit is implemented using \n`Python `__, supports both\nPython 2.7 and Python 3.\n\npyNfsClient project is hosted on GitHub_ where you can find source code,\nan issue tracker, and some further documentation.\n\n.. _GitHub: https://github.com/CharmingYang0/NfsClient\n.. _PyPI: https://pypi.org/project/pyNfsClient\n\n.. image:: https://img.shields.io/pypi/v/pyNfsClient.svg?label=version\n :target: https://pypi.org/project/pyNfsClient/\n :alt: Latest version\n\nInstallation\n------------\n\nIf you already have `Python `__ with `pip `__ installed,\nyou can simply run::\n\n pip install pyNfsClient\n\nAlternatively you can get source code by downloading the source\ndistribution from PyPI_ and extracting it, or by cloning the project repository\nfrom GitHub_. After that you can install the framework with::\n\n python setup.py install\n\nExample\n-------\n\nBelow is a simple example which lookup a file and then do several operations on it.\n\n.. code:: python\n\n from pyNfsClient import (Portmap, Mount, NFSv3, MNT3_OK, NFS_PROGRAM,\n NFS_V3, NFS3_OK, DATA_SYNC)\n\n # variable preparation\n host = \"192.221.4.119\"\n mount_path = \"/nfsshare\"\n\n auth = {\"flavor\": 1,\n \"machine_name\": \"host1\",\n \"uid\": 0,\n \"gid\": 0,\n \"aux_gid\": list(),\n }\n\n # portmap initialization\n portmap = Portmap(host, timeout=3600)\n portmap.connect()\n\n # mount initialization\n mnt_port = portmap.getport(Mount.program, Mount.program_version)\n mount = Mount(host=host, port=mnt_port, timeout=3600)\n mount.connect()\n\n # do mount\n mnt_res =mount.mnt(mount_path, auth)\n if mnt_res[\"status\"] == MNT3_OK:\n root_fh =mnt_res[\"mountinfo\"][\"fhandle\"]\n try:\n nfs_port =portmap.getport(NFS_PROGRAM, NFS_V3)\n # nfs actions\n nfs3 =NFSv3(host, nfs_port, 3600)\n nfs3.connect()\n lookup_res = nfs3.lookup(root_fh, \"file.txt\", auth)\n if lookup_res[\"status\"] == NFS3_OK:\n fh = lookup_res[\"resok\"][\"object\"][\"data\"]\n write_res = nfs3.write(fh, offset=0, count=11, content=\"Sample text\",\n stable_how=DATA_SYNC, auth=auth)\n if write_res[\"status\"] == NFS3_OK:\n read_res = nfs3.read(fh, offset=0, auth=auth)\n if read_res[\"status\"] == NFS3_OK:\n read_content = str(read_res[\"resok\"][\"data\"], encoding=\"utf-8\")\n assert read_content.startswith(\"Sample text\")\n else:\n print(\"write failed\")\n else:\n print(\"Lookup failed\")\n finally:\n if nfs3:\n nfs3.disconnect()\n mount.umnt(mount_path, auth)\n mount.disconnect()\n portmap.disconnect()\n else:\n mount.disconnect()\n portmap.disconnect()\n\nLicense\n-------\n\n**The MIT License (MIT)**\n\nCopyright (c) 2019 `Cooper Yang `__\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/CharmingYang0/NfsClient", "keywords": "RPC NFS struct", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pyNfsClient", "package_url": "https://pypi.org/project/pyNfsClient/", "platform": "any", "project_url": "https://pypi.org/project/pyNfsClient/", "project_urls": { "Homepage": "https://github.com/CharmingYang0/NfsClient" }, "release_url": "https://pypi.org/project/pyNfsClient/0.1.5/", "requires_dist": null, "requires_python": ">=2.7", "summary": "Pure python NFS client", "version": "0.1.5" }, "last_serial": 5355890, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "18a7542e2c94aee294de27806b68b04f", "sha256": "0276d981a96f593cf1297dd3a4adcf285b56380322941a1541ee0cf807053ea3" }, "downloads": -1, "filename": "pyNfsClient-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "18a7542e2c94aee294de27806b68b04f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7", "size": 36708, "upload_time": "2019-04-19T05:10:49", "url": "https://files.pythonhosted.org/packages/bb/b4/afcde015c244a357abddbcf5259aea722b8a45aea6dd41dcac1491d157cf/pyNfsClient-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1415fc588c8bdffb50eb9571faeddba7", "sha256": "c427089167445c68175a43fc2e1be19418c0f78c7a04cd40190f668c90227d9a" }, "downloads": -1, "filename": "pyNfsClient-0.1.1.tar.gz", "has_sig": false, "md5_digest": "1415fc588c8bdffb50eb9571faeddba7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 36667, "upload_time": "2019-04-19T05:10:52", "url": "https://files.pythonhosted.org/packages/37/fc/e4f26975cc6e4b7036039228260ff77d080e299c2d3192270007875d1bf2/pyNfsClient-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "adb2e5675cc60b43b3eb6245ea1a5df2", "sha256": "c7f4472aead191474a8f9e39c1d07476c417aec35edb8268b55ee52481853ef8" }, "downloads": -1, "filename": "pyNfsClient-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "adb2e5675cc60b43b3eb6245ea1a5df2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7", "size": 36700, "upload_time": "2019-04-19T05:29:05", "url": "https://files.pythonhosted.org/packages/ee/75/53689c9ae9256b926cc9aa4eb17989d64be15b4ae187c1e6b1d9186b7997/pyNfsClient-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "db2bbe301d04c07a236bd1ad2975563f", "sha256": "deefe4140d43ffed75f6a9595ab163967ed905812cdccc892c804cdaa301f232" }, "downloads": -1, "filename": "pyNfsClient-0.1.2.tar.gz", "has_sig": false, "md5_digest": "db2bbe301d04c07a236bd1ad2975563f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 36655, "upload_time": "2019-04-19T05:29:07", "url": "https://files.pythonhosted.org/packages/17/d4/b8a3263c3c14125326b8aac5e8a5d4edbbbfc347948be2ce72394bfd59f0/pyNfsClient-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "8e217d051046ba157b85f34bf16650e9", "sha256": "058e8aeea74f3904e7d4e51ba8e527acc745e664380f047806f7413d843794d1" }, "downloads": -1, "filename": "pyNfsClient-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8e217d051046ba157b85f34bf16650e9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7", "size": 36839, "upload_time": "2019-04-20T12:35:31", "url": "https://files.pythonhosted.org/packages/fe/21/e9c46467deb0dab560cd55a57af60deff7e92a4ce1aff08f135b9119f770/pyNfsClient-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dffceb696b540839ba7b392611d3cbc5", "sha256": "2f00d14aec9153b686db2c692e7c01b029431986329904e1e6e689c204166214" }, "downloads": -1, "filename": "pyNfsClient-0.1.3.tar.gz", "has_sig": false, "md5_digest": "dffceb696b540839ba7b392611d3cbc5", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 36748, "upload_time": "2019-04-20T12:35:35", "url": "https://files.pythonhosted.org/packages/05/64/e92dcba51fc7c4f01dfdec9ac12dff0e8339d72cadd15345fb759adcd91f/pyNfsClient-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "b1cfe8f2c6f134b053ad2f00a0a4b3ca", "sha256": "f9896ec7a26f03d11523ad7dbdd75588d5b986119fcd84b7e9df831e33f775e3" }, "downloads": -1, "filename": "pyNfsClient-0.1.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b1cfe8f2c6f134b053ad2f00a0a4b3ca", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7", "size": 36943, "upload_time": "2019-04-20T12:47:37", "url": "https://files.pythonhosted.org/packages/8c/88/2feaa8d4cee421fc2a69e3e705309bc2a8058b2a112ad1cb541cd9ae0fe5/pyNfsClient-0.1.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ad513fa412330a20881be031ddf8f9f6", "sha256": "c6e76099dce69192a72f41e1d447147723fbedd583fd29ffb576e5266cc60b80" }, "downloads": -1, "filename": "pyNfsClient-0.1.4.tar.gz", "has_sig": false, "md5_digest": "ad513fa412330a20881be031ddf8f9f6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 36837, "upload_time": "2019-04-20T12:47:40", "url": "https://files.pythonhosted.org/packages/86/44/b24ef65cf2cb0779166b71332532033d2f8228dfdfc84e38f0465c46df51/pyNfsClient-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "d99276b56bc8c159748df96fb3bd92d0", "sha256": "d988029d0b86ae2897bfb17162e47a81943a72508ccb37566ef23615c533cc59" }, "downloads": -1, "filename": "pyNfsClient-0.1.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d99276b56bc8c159748df96fb3bd92d0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7", "size": 36967, "upload_time": "2019-06-04T06:52:02", "url": "https://files.pythonhosted.org/packages/d0/2b/50136d18595dc478eb5e9418a1021d590a034fd3ac19f523eadc371d0270/pyNfsClient-0.1.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b5d6afd78c3b52d500b9bb476de88ab7", "sha256": "c6064bd3c365302a529002d0c24961ed7ab5e9b2b64a6da10329dbac85ac81a5" }, "downloads": -1, "filename": "pyNfsClient-0.1.5.tar.gz", "has_sig": false, "md5_digest": "b5d6afd78c3b52d500b9bb476de88ab7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 36863, "upload_time": "2019-06-04T06:52:05", "url": "https://files.pythonhosted.org/packages/f5/30/b45e9edad9507dcd88545688067fd8a51ab819ba11d934b9b218e5af68b7/pyNfsClient-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d99276b56bc8c159748df96fb3bd92d0", "sha256": "d988029d0b86ae2897bfb17162e47a81943a72508ccb37566ef23615c533cc59" }, "downloads": -1, "filename": "pyNfsClient-0.1.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d99276b56bc8c159748df96fb3bd92d0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7", "size": 36967, "upload_time": "2019-06-04T06:52:02", "url": "https://files.pythonhosted.org/packages/d0/2b/50136d18595dc478eb5e9418a1021d590a034fd3ac19f523eadc371d0270/pyNfsClient-0.1.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b5d6afd78c3b52d500b9bb476de88ab7", "sha256": "c6064bd3c365302a529002d0c24961ed7ab5e9b2b64a6da10329dbac85ac81a5" }, "downloads": -1, "filename": "pyNfsClient-0.1.5.tar.gz", "has_sig": false, "md5_digest": "b5d6afd78c3b52d500b9bb476de88ab7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 36863, "upload_time": "2019-06-04T06:52:05", "url": "https://files.pythonhosted.org/packages/f5/30/b45e9edad9507dcd88545688067fd8a51ab819ba11d934b9b218e5af68b7/pyNfsClient-0.1.5.tar.gz" } ] }