a python library that reads and writes Spirent iTest ParameterTree (.ffpt) files
Project description
ffptutils-py
A python library that reads/writes Spirent iTest Parameter (.ffpt) files.
Tested with Python 3.6, 3.7, and 3.8 on Windows and Ubuntu platforms.
Features
- Convert .ffpt file <-> .csv file.
- Supported CSV encoding is utf-8 with BOM (Suitable for Windows Excel).
- Supported Parameter Types are: TEXT, BOOLEAN, INTEGER and DOUBLE.
- Load .ffpt file from your python script.
Install
pip install ffptutils
Usage 1) Convert .ffpt <-> .csv
- Convert a ffpt file to csv format.
> ffpt2csv file1_orig.ffpt edit.csv
-
Edit the csv file using Excel or other software.
-
Convert the csv file back to ffpt format.
> csv2ffpt edit.csv file1.ffpt
Usage 2) General purpose .ffpt file loader
import ffptutils
pt = ffptutils.load('test/2.ffpt')
assert pt['param1'] == 'some value'
assert pt['param2'] == True
assert pt['param3'] == False
assert pt['param4'] == None
assert pt['param5'] == 24
assert pt['param6'] == 1.0
assert pt['param7/param1'] == 'hoge'
assert pt['param7/param2/param1'] == 'fuga'
As you can see, it recognizes the Parameter types and converts into the appropriate python types as below:
- TEXT -> str
- DOUBLE -> float
- INTEGER -> int
- BOOLEAN -> bool
PIP Package
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ffptutils-0.1.1.tar.gz.
File metadata
- Download URL: ffptutils-0.1.1.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
509f59c536a6419521206997a548fafc01567da73e1fb074011fedc3f1f38b11
|
|
| MD5 |
dce0eb1f0698915956416e3b00145d4b
|
|
| BLAKE2b-256 |
14965e7e51da8048cf87bcd95e501b979399093ed61c46fa9901b7c265c634cd
|
File details
Details for the file ffptutils-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ffptutils-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c642202956ae26f7e735a34b08fc30e49e6dae54d7ff66954c2bb05bf02664d4
|
|
| MD5 |
44695de9363d0d944533b81a10c467d2
|
|
| BLAKE2b-256 |
993bba2611b9ba02d7e885eaef259d6fb9ffd47cec6822ddbc9c29efa5d6e300
|