Metadata-Version: 2.1
Name: inventree_digikey_integration
Version: 1.0.0
Summary: A CLI to import Digikey parts into an Inventree instance
License: MIT
Author: Eric Udlis
Author-email: udlis.eric@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: digikey-api (>=1.0.0,<2.0.0)
Requires-Dist: inventree (>=0.13.1,<0.14.0)
Description-Content-Type: text/markdown

# Digikey-Inventree-Integration

## Setup

### Installation

#### Install from Pypi

`pip install inventree_digikey_integration`

#### Install from source

1. Install [poetry](https://python-poetry.org/docs/#installation)
2. Clone the repo `git clone git@github.com:EUdds/digikey-inventree-integration.git`
3. `cd digikey-inventree-integration`
4. `poetry install`

### Configuration

Create a config.ini file according to the template and specify it's location with the `-c <path>` flag

```
[DIGIKEY_API]
CLIENT_ID=
CLIENT_SECRET=

[INVENTREE_API]
URL=<URL to the inventree instance>
USER=
PASSWORD=
```


## Usage

Invoke the cli by running `import_digikey_parts`

```bash
usage: import_digikey_parts [-h] [-y] [-c CONFIG] query_numbers [query_numbers ...]

Import Digikey part numbers into InvenTree

positional arguments:
  query_numbers         Part number(s) to import

optional arguments:
  -h, --help            show this help message and exit
  -y, --yes             Bypass user prompts and assume "yes"
  -c CONFIG, --config CONFIG
                        Path to config file
```

## Testing

Run the test suite by running `poetry run pytest`
