NFC Data Exchange Format (NDEF) decoder and encoder for Python. Version 0.3.3, low release cadence. Supports creation, parsing, and serialization of NDEF messages used in NFC tags and peer-to-peer communication.
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
from ndef import TextRecord
from ndef import UriRecord
Create an NDEF message with a text record, encode to bytes, then decode back.
from ndef import Message, Record, make_text_record
# Create a text record
record = make_text_record('Hello, NFC!', encoding='utf-8')
# Create a message with the record
message = Message(record)
# Encode to bytes
encoded = message.to_bytes()
print('Encoded:', encoded.hex())
# Decode from bytes
decoded = Message.from_bytes(encoded)
for record in decoded:
print('Record type:', record.type)
print('Record payload:', record.data)
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.
Agent activity
0 hits · last 30 days
No traffic data recorded yet.