Generating Random NFC Tag with PyNFC

  • Share this:

Code introduction


This function uses the PyNFC library to connect and return a specified type of NFC tag.


Technology Stack : PyNFC library

Code Type : Function

Code Difficulty : Intermediate


                
                    
        def generate_random_tag(tag_type):
            from nfc import Nfc, Tag
            nfc = Nfc()
            tag = nfc.connect(tag_type)
            return tag
        
                        
              
Tags: