Skip to main content

naneos particle solutions gmbh python backend

Project description

naneos-devices

GitHub Issues GitHub Pull Requests Ruff License

Projektlogo

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.

Installation

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

Usage

To establish a serial connection with the Partector2 device and retrieve data, you can use the following code snippet as a starting point:

import time

from naneos.partector import PartectorSerialManager


manager = PartectorSerialManager()
manager.start()

time.sleep(15)  # Let the manager run for a while
data = manager.get_data()

manager.stop()
manager.join()

print("Collected data:")
print()
for sn, df in data.items():
    print(f"SN: {sn}")
    print(df)
    print("-" * 40)
    print()

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.

Documentation

The documentation for the naneos-devices package can be found in the package's documentation page.

Protobuf

Use this command to create a py and pyi file from the proto file

protoc -I=. --python_out=. --pyi_out=. ./protoV1.proto 

Testing

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

Building executables

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

Ideas for future development

  • P2 BLE implementation that integrates into the implementation of the serial P2
  • P2 Bidirectional Implementation that allows to send commands to the P2
  • Automatically activate Bluetooth or ask when BLE is used

Contributing

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.

License

This repository is licensed under the MIT License.

Contact

For any questions, suggestions, or collaborations, please feel free to contact the project maintainer:

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

naneos_devices-1.1.0.tar.gz (119.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

naneos_devices-1.1.0-py3-none-any.whl (50.0 kB view details)

Uploaded Python 3

File details

Details for the file naneos_devices-1.1.0.tar.gz.

File metadata

  • Download URL: naneos_devices-1.1.0.tar.gz
  • Upload date:
  • Size: 119.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.13

File hashes

Hashes for naneos_devices-1.1.0.tar.gz
Algorithm Hash digest
SHA256 2a7a5498181c2be6ef2d939285e11720799065dbf88f4e3bc08425efe335a8a1
MD5 4b0c5583c76e9dd96b57e40e93b61751
BLAKE2b-256 92f6d91b0013aaf501bd5ec4bb4577fef7df03f7543f473a83525629d95759b7

See more details on using hashes here.

File details

Details for the file naneos_devices-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for naneos_devices-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b419d57175d9cf3e8eeee33f12aaef901719865abb073e6d66836330c56d314c
MD5 004e9e8eb6c4544b43687d65dbf4a801
BLAKE2b-256 074dbb886752f918605d3cbba9d8ee6df5f610f96451b9157f34051863cb4c3a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page