TLV(tag length lavue) data parser, especially useful for EMV tags parsing
Project description
TLV (tag length lavue) data parser, especially useful for [EMV](http://emvco.com) tags parsing
To import the pytlv module in your code:
```python
from pytlv.TLV import *
```
To parse data from a TLV string:
```python
tlv = TLV(['84', 'A5']) # provide the possible tag values
tlv.parse('840E315041592E5359532E4444463031A5088801025F2D02656E')
>>> {'84': '315041592E5359532E4444463031', 'A5': '8801025F2D02656E'}
```
To build a TLV string:
```python
tlv = TLV(['9F02', '9F04'])
tlv.build({'9f02': '000000001337'})
>>> '9F0206000000001337'
```
To import the pytlv module in your code:
```python
from pytlv.TLV import *
```
To parse data from a TLV string:
```python
tlv = TLV(['84', 'A5']) # provide the possible tag values
tlv.parse('840E315041592E5359532E4444463031A5088801025F2D02656E')
>>> {'84': '315041592E5359532E4444463031', 'A5': '8801025F2D02656E'}
```
To build a TLV string:
```python
tlv = TLV(['9F02', '9F04'])
tlv.build({'9f02': '000000001337'})
>>> '9F0206000000001337'
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytlv-0.71.tar.gz
(15.7 kB
view details)
File details
Details for the file pytlv-0.71.tar.gz
.
File metadata
- Download URL: pytlv-0.71.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6edc59d284339f5669c178a11e583a09db8b87c9e47ab2d5ed2a05c97cc98d56 |
|
MD5 | a5524ed1c8e7ca26f4408a15d6570b7f |
|
BLAKE2b-256 | bffb05cb227d725bae7fce250c5b4706442d74e94e3f5faa655efd4621ed559c |