Skip to main content

NFC Data Exchange Format decoder and encoder.

Project description

Python Package Stable Documentation 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ndeflib-0.3.2.tar.gz (143.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ndeflib-0.3.2-py2.py3-none-any.whl (57.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ndeflib-0.3.2.tar.gz.

File metadata

  • Download URL: ndeflib-0.3.2.tar.gz
  • Upload date:
  • Size: 143.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ndeflib-0.3.2.tar.gz
Algorithm Hash digest
SHA256 4a9d8733e22a28bc26d444f5eb3f6ab499a268c47fba5786cdc3489b3835f65a
MD5 6fd1000be7e1eb4caf3cbeac971d2338
BLAKE2b-256 cfd3babd8b3a2aaeb65d72a7d4b25a619f1ac19a7804ef7510733f0f43596bec

See more details on using hashes here.

File details

Details for the file ndeflib-0.3.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for ndeflib-0.3.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ef4e139a0ee8c8379b75809d70e49d295cd28ad40aeed4a9d6ec3bff618d7c95
MD5 e4819bd004ba3af62fa13b025a534506
BLAKE2b-256 017639eb236dc5566618abdb169cb88ba4eabd22245b29cc9e5f8d91d5fcf261

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page