Metadata-Version: 2.4
Name: jitxlib-parts
Version: 1.0.0
Summary: Python interface to JITX parts database
Project-URL: Homepage, https://jitx.com
Project-URL: Documentation, https://docs.jitx.com
Author: JITX
Maintainer: JITX
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.12
Requires-Dist: black==25.1.0
Requires-Dist: dataclasses-json==0.6.7
Requires-Dist: jitx<4.1,>=4.0.0
Requires-Dist: jitxlib-standard<4.1,>=4.0.0
Requires-Dist: websockets>=11.0.0
Description-Content-Type: text/markdown

# JITX Parts Database

A Python interface to the JITX parts database allowing you to query and use components from the JITX parts database in your Python scripts.

## Installation

```bash
pip install jitxlib-parts
```

## Usage

```python
from jitxlib.parts import ResistorQuery, Resistor
from jitx.design import Design
from jitx.units import kohm, pct

# Create a query for a resistor
query = ResistorQuery(
    resistance=10 * kohm,  # 10kΩ, can also provide a float like 10e3
    tolerance=1 * pct,     # 1%, can also provide a float (unit-less) like 0.01
)
# Create another query from an existing query.
query_with_case = query.update(case="0603")


class MainCircuit(Circuit):

    # All part queries have to be executed during the instantiation of a JITX design.
    def __init__ (self) :
        # Query a resistor and instantiate it.
        self.resistor = Resistor(query_with_case)

# Use in a design
class MyDesign(Design):
    circuit = MainCircuit()
    ...
```

## Features

- Query the JITX parts database for components
- Create components from query results
- Support for resistors, capacitors, inductors, and other components
- Integration with py-jitx for use in designs

## Requirements

- Python 3.12+
- jitx package
