Skip to content

Commit c121c41

Browse files
committed
📝 add schnee package documentation and usage examples
1 parent ac8954d commit c121c41

1 file changed

Lines changed: 84 additions & 0 deletions

File tree

README.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,87 @@
1+
## schnee
2+
3+
`schnee` is a Python package and CLI for working with NFC/RFID tags through a PC/SC
4+
reader, with a current focus on NTAG profile inspection and NDEF URL writes.
5+
6+
## Installation
7+
8+
Install the package from PyPI:
9+
10+
```bash
11+
pip install schnee
12+
```
13+
14+
## Requirements
15+
16+
`schnee` talks to tags through PC/SC, so practical use requires:
17+
18+
- a compatible NFC or smart card reader
19+
- a working PC/SC stack on the host system
20+
- access to the target tag
21+
22+
If the PC/SC stack or reader is not available, CLI commands that access hardware
23+
will fail during reader discovery or card communication.
24+
25+
## CLI Usage
26+
27+
After installation, the `schnee` command is available on your `PATH`.
28+
29+
Show the top-level help:
30+
31+
```bash
32+
schnee --help
33+
```
34+
35+
List selectable backends and detected PC/SC readers:
36+
37+
```bash
38+
schnee backends
39+
```
40+
41+
Read the current NTAG profile as JSON:
42+
43+
```bash
44+
schnee ntag read --backend pcsc
45+
```
46+
47+
Use a specific reader by name:
48+
49+
```bash
50+
schnee ntag read --backend "pcsc:ACS ACR1252 1S CL Reader PICC 0"
51+
```
52+
53+
Write a URL as a single NDEF URI record:
54+
55+
```bash
56+
schnee ntag write-url --backend pcsc --url "https://example.com"
57+
```
58+
59+
For NTAG 424 DNA tags that require application authentication before writing,
60+
provide the current 16-byte AES key as 32 hex characters:
61+
62+
```bash
63+
schnee ntag write-url \
64+
--backend pcsc \
65+
--url "https://example.com" \
66+
--ntag424-master-key-hex 00112233445566778899aabbccddeeff
67+
```
68+
69+
## Python API
70+
71+
The stable Python entry points currently exposed by the package are the service
72+
classes re-exported from `schnee.services`. For example, you can list the
73+
selectable backends from Python:
74+
75+
```python
76+
from schnee.services import ListBackendNamesService
77+
78+
backends = ListBackendNamesService.call(ListBackendNamesService.Request())
79+
print(backends)
80+
```
81+
82+
This call uses the same backend discovery as `schnee backends`, so it also
83+
depends on a working PC/SC environment when the PC/SC backend is enabled.
84+
185
## Trademarks and Disclaimer
286

387
* **Trademarks**:

0 commit comments

Comments
 (0)