{ "info": { "author": "Amir Szekely", "author_email": "kichik+pyndef@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: zlib/libpng License", "Programming Language :: Python :: 2.7" ], "description": "#################################################\nPython Module for NFC Data Exchange Format (NDEF)\n#################################################\n\nRelease v0.1 -- February 22nd, 2014\n\nThe **ndef** modules provides methods for creating and parsing messages and records in the NDEF format according to NFC\nForum technical specification. Its main purpose is to provide comprehensive verification of raw NDEF messages. It can be\nused to verify messages before writing them to an actual tag.\n\nAvailable on PyPI_.\n\n.. _PyPI: https://pypi.python.org/pypi/ndef/\n\nUsage\n-----\n\nValid Message\n~~~~~~~~~~~~~\n\n >>> import ndef\n >>> message_data = 'D1010F5402656E48656C6C6F20776F726C6421'.decode('hex')\n >>> message = ndef.NdefMessage(message_data)\n >>> record = message.records[0]\n >>> record.tnf\n 1\n >>> record.type\n 'T'\n >>> record.id\n >>> record.payload\n '\\x02enHello world!'\n >>>\n\nInvalid Message\n~~~~~~~~~~~~~~~\n\n >>> import ndef\n >>> message_data = '9901050155610123456761'.decode('hex')\n >>> message = ndef.NdefMessage(message_data)\n Traceback (most recent call last):\n File \"\", line 1, in \n File \"ndef\\ndef.py\", line 274, in __init__\n self.verify()\n File \"ndef\\ndef.py\", line 278, in verify\n self._verify_begin_end()\n File \"ndef\\ndef.py\", line 296, in _verify_begin_end\n raise InvalidNdefMessage(\"last record's ME flag is off\")\n ndef.ndef.InvalidNdefMessage: last record's ME flag is off\n >>>\n\nCreate Message\n~~~~~~~~~~~~~~\n\n >>> import ndef\n >>> text_record = (ndef.TNF_WELL_KNOWN, ndef.RTD_TEXT, 'id', 'hello world')\n >>> text_message = ndef.new_message(text_record)\n >>> text_raw_ndef = text_message.to_buffer()\n >>> text_raw_ndef.encode('hex')\n 'd9010b0254696468656c6c6f20776f726c64'\n >>>\n\nAlternatives\n------------\n\n- nfcpy_: full implementation of spec including actual communication code\n- `Python NDEF library and tools`_: aimed at security research\n- `pynfc`_: pythonic interface for the libnfc library\n\n.. _nfcpy: http://nfcpy.readthedocs.org/\n.. _Python NDEF library and tools: http://mulliner.org/nfc/feed/collins_nfcndef_python_stuff.tgz\n.. _pynfc: https://code.google.com/p/pynfc/\n\nLicense\n-------\n\n::\n\n Copyright (c) 2014 Amir Szekely\n \n This software is provided 'as-is', without any express or implied\n warranty. In no event will the authors be held liable for any damages\n arising from the use of this software.\n \n Permission is granted to anyone to use this software for any purpose,\n including commercial applications, and to alter it and redistribute it\n freely, subject to the following restrictions:\n \n 1. The origin of this software must not be misrepresented; you must not\n claim that you wrote the original software. If you use this software\n in a product, an acknowledgment in the product documentation would be\n appreciated but is not required.\n \n 2. Altered source versions must be plainly marked as such, and must not be\n misrepresented as being the original software.\n \n 3. This notice may not be removed or altered from any source\n distribution.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/kichik/pyndef", "keywords": null, "license": "zlib/libpng", "maintainer": null, "maintainer_email": null, "name": "ndef", "package_url": "https://pypi.org/project/ndef/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ndef/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/kichik/pyndef" }, "release_url": "https://pypi.org/project/ndef/0.1/", "requires_dist": null, "requires_python": null, "summary": "NDEF (NFC Data Exchange Format) parser and verifier", "version": "0.1" }, "last_serial": 1008722, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "2a36f6f706760c0e328b5fa3b03b8a5e", "sha256": "fcdf15c4284843db77cdbb1330d48d2575c697b819da488af208ad3d22f97a5a" }, "downloads": -1, "filename": "ndef-0.1.zip", "has_sig": false, "md5_digest": "2a36f6f706760c0e328b5fa3b03b8a5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9810, "upload_time": "2014-02-22T21:14:48", "url": "https://files.pythonhosted.org/packages/0e/40/3271e732557464fb62a39698cfb1deb0838457d7ac82028b6c052a024bd4/ndef-0.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2a36f6f706760c0e328b5fa3b03b8a5e", "sha256": "fcdf15c4284843db77cdbb1330d48d2575c697b819da488af208ad3d22f97a5a" }, "downloads": -1, "filename": "ndef-0.1.zip", "has_sig": false, "md5_digest": "2a36f6f706760c0e328b5fa3b03b8a5e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9810, "upload_time": "2014-02-22T21:14:48", "url": "https://files.pythonhosted.org/packages/0e/40/3271e732557464fb62a39698cfb1deb0838457d7ac82028b6c052a024bd4/ndef-0.1.zip" } ] }