tsapython
An Unofficial Python API for the tinySA Device Series
A non-GUI Python API for the tinySA series of spectrum analyzer devices. This library provides programmatic control over tinySA devices for automated measurements, data collection, and analysis.
This repository uses official resources and documentation but is NOT endorsed by the official tinySA product, owner, or company. Refer to official resources and support for product information. This library was built for the official tinySA device line(s); knock-off or custom devices may not be compatible and have not been tested.
Features
- Device Discovery — automatic detection and serial connection to tinySA devices
- Frequency Sweeps — collect data across specified frequency ranges
- Multiple Modes — support for both input and output modes (device dependent)
- Data Export — easy integration with
matplotlibandnumpy - Error Handling — input checking and verbose output options
- Device Control — full programmatic control of tinySA settings and measurements
Installation
pip install tsapython
The library itself depends only on numpy and pyserial. The plotting examples need an optional extra:
pip install "tsapython[plotting]"
Quick Start
from tsapython import tinySA
tsa = tinySA()
found, connected = tsa.autoconnect()
if connected:
print(tsa.device_id())
tsa.disconnect()
Examples
The main GitHub repository provides runnable examples, grouped by what they demonstrate.
Getting started / device control
using_autoconnect.py— detect and connect to a tinySA, read the device IDidentifying_serial_ports.py— manually identify serial ports (useful if autoconnect has trouble)using_command_func.py— send raw device commands for functionality not yet wrapped by the libraryhardware_walkthrough.py— a guided walkthrough of connecting and reading device info/datacomplete_workflow.py— end-to-end: connect, read info, collect a sweep, and plot it
Plotting scan data
plotting_scan.py— plot a singlescanplotting_scanraw.py— comparescanvs. the binaryscanraw(with decoding to dBm)plotting_waterfall_static.py— collect several sweeps and render a static waterfall plotplotting_waterfall_realtime.py— a live, continuously updating waterfall plot
Continuous acquisition
continuous_scanraw_live.py— loopscan_rawand live-plot each framecontinuous_scanraw_collect.py— loopscan_raw, decode to dBm, and save sweeps to CSV
Analysis
find_peaks.py— find the strongest signal(s) two ways: the device's marker peak, and a Python multi-peak finder over scan datafiltering_scan_artifacts.py— show the:firmware artifact and compare a median filter against a moving average on one figure
Exporting data
save_scan_csv.py— run a scan and write frequency/power pairs to a CSV file
Most plotting examples require the optional plotting dependencies:
pip install "tsapython[plotting]"
Documentation
For comprehensive documentation, advanced examples, and troubleshooting:
- Library GitHub repository: https://github.com/LC-Linkous/tinySA_python/
- Official tinySA documentation: https://tinysa.org/wiki/ (not associated with this library)
Contributing
This is an unofficial community project. Contributions welcome!
- Report bugs and request features on GitHub
- For device information and OFFICIAL resources, see the official tinySA community at https://groups.io/g/tinysa
- Please do NOT request features or report bugs on the official community! This is an unofficial project and they do not maintain it.
Citing
If you use this library in your work, citation details are in the repository's CITATION.cff, or use the Zenodo DOI: 10.5281/zenodo.20546764.
License
GPL-2.0 — this is unofficial software with no warranty, offered AS-IS. Use at your own risk.
The licensing of this software does NOT take priority over the official releases and the decisions of the official tinySA team. This licensing does NOT take priority for any of their products, including the devices that can be used with this software.
Acknowledgments
- The tinySA device creators and community, who have created an awesome device
- Official tinySA documentation and resources, especially www.tinysa.org/wiki/
- All contributors to this library, including those who have contributed code and reached out with questions
Disclaimer: This software is unofficial and not supported by the tinySA team. For official software and support, visit tinysa.org. The tinySA team does not offer tech support for this software, does not maintain it, and has no responsibility for any of the contents.
Release files for tsapython 3.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tsapython-3.0.1.tar.gz | 31.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tsapython-3.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 71.1 kB
Release files / tsapython-3.0.1.tar.gz
| Download URL | tsapython-3.0.1.tar.gz |
|---|---|
| Size | 31.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8d7923adc717b24dd59635597fc3541e5a6ea8eb2dfa2bdab9103321b69291b
|
|
BLAKE2b-256 checksum How to use checksums |
2287b39f4c0955c691e5ebb330292f59667e890a36e30dccf1d51038e6d3a160
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency logRelease files / tsapython-3.0.1-py3-none-any.whl
| Download URL | tsapython-3.0.1-py3-none-any.whl |
|---|---|
| Size | 39.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b8073e5e32aaf411f72908e22966b7511bafb0118dcff3f07c8a603ce5af51cb
|
|
BLAKE2b-256 checksum How to use checksums |
78f8bba5ba3393bfb74e57e9faf33e958f283d911875e11e59896596010cc491
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency log