Metadata-Version: 2.1
Name: limedriver
Version: 0.4.0
Summary: Python bindings for limedriver
Author-email: Kumi <limedriver@kumi.email>
License: MIT License
        
        Copyright (c) 2024 nqrduck
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://nqrduck.cool
Project-URL: Bug Tracker, https://github.com/nqrduck/limedriverbindings/issues
Project-URL: Source Code, https://github.com/nqrduck/limedriverbindings
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: h5py

# Python Bindings for LimeDriver

This is a Python package for the [LimeDriver](https://github.com/nqrduck/LimeDriver/) library.

## Dependencies

To build the Python bindings, you will need to have the dependencies for LimeDriver installed, as well as the Python development headers.

### Debian/Ubuntu

```bash
sudo apt-get install g++ cmake libhdf5-dev liblimesuite-dev python3-dev python3-pip python3-venv
```

### Arch Linux

```bash
sudo pacman -S gcc cmake hdf5 limesuite python python-pip
```

## Installation

It is recommended to install the Python bindings in a virtual environment. To create a new virtual environment, run the following commands:

```bash
python3 -m venv venv
source venv/bin/activate
```

Ensure that the LimeDriver submodule is initialized:

```bash
git submodule update --init
```

Now, the Python bindings can be built and installed using pip:

```bash
pip install .
```

## Usage

The Python bindings provide a high-level interface to the LimeDriver library:

```python
# Import the LimeDriver module
import limedriver

# Set the number of pulses to generate
Npulses = 1000

# Create a new PyLimeConfig object
config = limedriver.PyLimeConfig(Npulses)

# Modify the config as needed
config.srate = 1e6

# Execute the config on the LimeSDR
config.run()

# Get the path to the output file
filename = config.get_path()

# Use the built-in HDF5 reader to read the output file
data = limedriver.hdf_reader.HDF(filename)
data.print_params()
```
