Metadata-Version: 2.5
Name: simple-nfc-tag
Version: 0.0.1
Summary: Read and write data to NFC tags (MIFARE Classic, Ultralight, NTAG) over PC/SC readers
Project-URL: Homepage, https://github.com/nicolasgutierrezdev/simple-nfc-tag
Project-URL: Repository, https://github.com/nicolasgutierrezdev/simple-nfc-tag
Project-URL: Issues, https://github.com/nicolasgutierrezdev/simple-nfc-tag/issues
Project-URL: Changelog, https://github.com/nicolasgutierrezdev/simple-nfc-tag/blob/main/CHANGELOG.md
Author-email: Nicolas Gutierrez <contacto@nicolasgutierrez.uy>
License-Expression: MIT
License-File: LICENSE
Keywords: acr122u,mifare,nfc,ntag,pcsc,rfid,smartcard,ultralight
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: System :: Hardware :: Hardware Drivers
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# simple-nfc-tag

Read and write data to NFC tags — MIFARE Classic, Ultralight and NTAG21x — through PC/SC
readers such as the ACR122U, without hand-writing APDUs.

> **Status: placeholder.** `0.0.1` reserves the name and contains no functionality.
> The design is settled and implementation is underway. Do not depend on this yet.

## Why

`pyscard` gives you raw APDU plumbing. `nfcpy` drives PN53x chipsets over libusb and fights the
PC/SC driver on Windows. `ndeflib` parses records but never touches hardware. Nothing covers
"give me the bytes off this tag, and don't make me care whether it's a Classic or an NTAG."

## Planned API

```python
import simple_nfc_tag as snt

with snt.connect() as reader:
    tag = reader.wait_for_tag(timeout=5)
    print(tag.uid.hex(), tag.product, tag.user_size)

    tag.write(["ABC123", 42])   # compact TLV, auto-typed
    print(tag.read())           # -> ["ABC123", 42]
```

Three access patterns: `reader.current_tag()` (non-blocking poll), `reader.wait_for_tag()`
(blocking), and `Monitor(reader, on_tag=...)` (background thread with callbacks).

## Planned scope

- **Readers** — generic PC/SC, ACR122U (buzzer, LED, PN532 passthrough), in-memory fake for tests
- **Tags** — MIFARE Classic 1K/4K, Ultralight, NTAG213/215/216, identified automatically
- **Formats** — compact TLV and raw bytes; NDEF planned as a later codec
- Sector-trailer skipping, page-granularity writes and authentication handled for you

## License

MIT
