Skip to main content

Add your description here

Project description

nfctagger

NFC Tag Reading and Writing Library

Introduction

This library provides a simple way to read and write NFC tags. At first it will focus on using the ACR122U reader, with NTAG21x tags. It will be extended to support other readers and tags in the future as I gain access to relevant readers and tags.

Motivations

  • At this point nfcpy which is a great library, is not being maintained(?) and it's support for ACR122U is not working.
  • pyscard, the other library that supports ACR122U is very low level and does not handle much directly i.e. working with NDEF messages, handling specific operations. In the end, it requires a lot of knowledge of the NFC protocol to use it. Removing that barrier is the goal of this library.

Prerequisites

This library uses pyscard to talk to the card reader. So it requires a properly working pyscard installation including a pcscd daemon running.

Installation

Once this library is published, it will be available on PyPI and can be installed with pip:

pip install nfctagger

Usage

Right now after installation you can either use it as a library or as a command line tool to overwrite an NTAG215 with a hello world message

python -mnfctagger

To use the library in your code, you can use the following example:

from nfctagger import PCSCWaiter

waiter = PCSCWaiter()

ncards = 0
while True:
    # wait for a card to be detected for 1 second
    connection = waiter.get_next_connection(timeout=1)
    if connection is None:
        continue
    handle(connection)
return 0

Development

This library uses the uv program to manage the virtual environment and dependencies. Imports should follow the order reorder-python-imports.

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

nfctagger-0.0.2.tar.gz (25.4 kB view details)

Uploaded Source

Built Distribution

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

nfctagger-0.0.2-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file nfctagger-0.0.2.tar.gz.

File metadata

  • Download URL: nfctagger-0.0.2.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.3

File hashes

Hashes for nfctagger-0.0.2.tar.gz
Algorithm Hash digest
SHA256 1bbcce2908eb8e01d24c47573b53ba3ecafdd6fcb790200e1d4312fb16f5be87
MD5 2b7ca815aa52914be55b46f6278edf3d
BLAKE2b-256 4ccc988ebaf603fd65a2e659f6fed186bf1f6ea7442b58256b69ee3a8931c3c2

See more details on using hashes here.

File details

Details for the file nfctagger-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: nfctagger-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.3

File hashes

Hashes for nfctagger-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 097002f43c5bc2e4486ac86ac593a4b3332d097b9e83cc88d3e19bf3660a962f
MD5 d0de76840ed964bec978d8ec413b2216
BLAKE2b-256 7b1c4c14072dffe2af878fc6b3bba1cf35b9ce8a27312436a270d652bc6a9709

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