
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
naneos-devices
Advanced tools
This repository contains a collection of Python scripts and utilities for our naneos particle solutions measurement devices. These scripts will provide various functionalities related to data acquisition, analysis, and visualization for your measurement devices.
You can install the naneos-devices package using pip. Make sure you have Python 3.10 or higher installed. Open a terminal and run the following command:
pip install naneos-devices
NaneosDeviceManager is a tiny, fire-and-forget thread that auto-manages Naneos devices over Serial and BLE, periodically gathers data, and (optionally) uploads it. You can enable/disable transports at construction time and at runtime, adjust the gathering interval, and/or pipe data into your own code via a user-provided queue.Queue. Clean start/stop APIs make integration trivial.
Highlights
import time
from naneos.manager import NaneosDeviceManager
manager = NaneosDeviceManager(
use_serial=True,
use_ble=True,
upload_active=True,
gathering_interval_seconds=30 # clamped to [10, 600]
)
manager.start()
try:
while True:
remaining = manager.get_seconds_until_next_upload()
print(f"Next upload in: {remaining:.0f}s")
time.sleep(remaining + 1)
print("Serial:", manager.get_connected_serial_devices())
print("BLE :", manager.get_connected_ble_devices())
print()
except KeyboardInterrupt:
pass
manager.stop()
manager.join()
print("Stopped.")
# Turn Serial on/off during runtime
manager.use_serial_connections(True) # or False
print("Serial enabled:", manager.get_serial_connection_status())
# Turn BLE on/off during runtime
manager.use_ble_connections(False) # or True
print("BLE enabled:", manager.get_ble_connection_status())
# Enable/disable uploads on the fly
manager.set_upload_status(False) # keep gathering, but don't upload
print("Upload active:", manager.get_upload_status())
# Update the gathering interval at runtime (10–600 s)
manager.set_gathering_interval_seconds(45)
print("Interval (s):", manager.get_gathering_interval_seconds())
Register a queue to receive each gathered snapshot (no uploads required):
import queue
out_q: queue.Queue = queue.Queue()
manager = NaneosDeviceManager(
upload_active=False, # we'll handle data ourselves
gathering_interval_seconds=15
)
manager.register_output_queue(out_q)
manager.start()
try:
while True:
# Wait until a snapshot is ready, then pull all pending ones
time.sleep(manager.get_seconds_until_next_upload() + 1)
while not out_q.empty():
snapshot = out_q.get()
# snapshot: dict[int, pandas.DataFrame] keyed by device serial
print(f"Received snapshot for {len(snapshot)} device(s)")
for serial, df in snapshot.items():
print(f" - {serial}: {len(df)} rows")
# >>> Your processing here (store, analyze, forward, etc.)
except KeyboardInterrupt:
pass
manager.stop()
manager.join()
Make sure to modify the code according to your specific requirements. Refer to the documentation and comments within the code for detailed explanations and usage instructions.
The documentation for the naneos-devices package can be found in the package's documentation page.
Use this command to create a py and pyi file from the proto file
protoc -I=. --python_out=. --pyi_out=. ./protoV1.proto
I recommend working with uv. Testing with the local python venv in vscode GUI or with:
uv run --env-file .env pytest
Testing every supported python version:
nox -s tests
Sometimes you want to build an executable for a customer with you custom script. The build must happen on the same OS as the target OS. For example if you want to build an executable for windows you need to build it on Windows.
pyinstaller demo/p1UploadTool.py --console --noconfirm --clean --onefile
Before running the installation script, make sure your Raspberry Pi is set up with Raspberry Pi OS. You can copy the operating system to an SD card using the official Raspberry Pi Imager. It does not matter whether you install it headless or with a display.
Download the Imager here: https://www.raspberrypi.com/software/
This script automatically downloads all required files for the uploader, makes the installer executable, and runs it. It sets up a Python virtual environment, installs the python-naneos-devices package, and creates a systemd service that starts automatically on boot.
mkdir tmp_naneos \
&& cd tmp_naneos \
&& curl -L https://api.github.com/repos/naneos-org/python-naneos-devices/contents/installers/rp-naneos-uploader/?ref=main \
-H "Accept: application/vnd.github.v3+json" \
| grep download_url \
| cut -d '"' -f 4 \
| wget -i - \
&& sudo chmod +x install.sh \
&& sudo ./install.sh \
&& cd .. \
&& sudo rm -rf tmp_naneos
After installation, the uploader runs automatically in the background and will restart after every reboot.
To check the service status:
sudo systemctl status naneos_uploader.service
Contributions are welcome! If you encounter any issues or have suggestions for improvements, please submit an issue on the issue tracker.
Please make sure to adhere to the coding style and conventions used in the repository and provide appropriate tests and documentation for your changes.
This repository is licensed under the MIT License.
For any questions, suggestions, or collaborations, please feel free to contact the project maintainer:
FAQs
naneos particle solutions gmbh python backend
We found that naneos-devices demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.