All Projects → nfcpy → ndeflib

nfcpy / ndeflib

Licence: ISC license
Python package for parsing and generating NFC Data Exchange Format messages.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to ndeflib

flutter nfc kit
Flutter plugin to provide NFC functionality on Android and iOS, including reading metadata, read & write NDEF records, and transceive layer 3 & 4 data with NFC tags / cards
Stars: ✭ 119 (+158.7%)
Mutual labels:  ndef
NFCSupport
Support library for NFC NDEF Records
Stars: ✭ 20 (-56.52%)
Mutual labels:  ndef
Plugin.NFC
A Cross-Platform NFC (Near Field Communication) plugin to easily read and write NFC tags in your application.
Stars: ✭ 113 (+145.65%)
Mutual labels:  ndef

Parse or generate NDEF messages

Python Package Latest Documentation Build Status Code Coverage

The ndeflib is an ISC-licensed Python package for parsing and generating NFC Data Exchange Format (NDEF) messages:

>>> import ndef
>>> hexstr = '9101085402656e48656c6c6f5101085402656e576f726c64'
>>> octets = bytearray.fromhex(hexstr)
>>> for record in ndef.message_decoder(octets): print(record)
NDEF Text Record ID '' Text 'Hello' Language 'en' Encoding 'UTF-8'
NDEF Text Record ID '' Text 'World' Language 'en' Encoding 'UTF-8'
>>> message = [ndef.TextRecord("Hello"), ndef.TextRecord("World")]
>>> b''.join(ndef.message_encoder(message)) == octets
True

The ndeflib documentation can be found on Read the Docs, the code on GitHub. It is continously tested for Python 2.7 and 3.5 with pretty complete test coverage.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].