New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

TagBit

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

TagBit

A lightweight python library for reading and writing to NFC tags via PC/SC

  • 1.0
  • PyPI
  • Socket score

Maintainers
1

TagBit

TagBit is a lightweight python library for reading and writing to NFC tags through the PC/SC API.

I built this library because nfcpy lacked support for the Sony PaSoRi RC-S300. Because I built it around that device it isn't yet guaranteed to work with other readers, although since it is built around PC/SC it should have basic support for most readers.

TagBit uses pyscard to interface with the NFC reader.

Installation

PyPI PyPI - Downloads

You can install TagBit from PyPI using pip.

pip install tagbit

Usage

TagBit can be used to read and write NDEF messages, and to create dumps of Amiibos. Here are some examples:

Reading

from tagbit import Reader

reader = Reader()

tag = reader.get_tag()

records = tag.read()  # Returns the NDEF records from the tag.

Writing

from tagbit import Reader
import ndef  # https://pypi.org/project/ndeflib/

records = [
    ndef.TextRecord("Hello, world!", 'en'),
]

reader = Reader()

tag = reader.get_tag()

tag.write(records)  # Saves the NDEF records to the tag.

Amiibos

from tagbit import Reader

reader = Reader()

tag = reader.get_tag()

amiibo_id = tag.get_id()  # Returns the UID of the Amiibo.

amiibo_bin = tag.dump()  # Creates a dump of the Amiibo.

Plans

  • Add support for MIFARE Classic 1k and other formats
  • Add tools for creating Amiibos from dumps
  • Test with other NFC reader models and expand compatibility
  • Improve NDEF implementation if needed

Support

If you liked this project, go ahead and give it a star! And if it really helped you out, consider sending me a tip!

BTC: bc1q0pp60krluv7a2w5cls09l9ahat5lqvu7mt9efq

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc