semvec/pypi-packages huggingface dataset:
instrument-connector 0.1.0
A Python library to connect to instruments via PyVISA
License: MIT
Requires Python: >=3.7

# instrument_connector

**instrument_connector** Ã¨ una libreria Python che semplifica la connessione a strumenti via PyVISA. La libreria fornisce un'interfaccia facile da usare per cercare, connettersi e gestire strumenti di misura utilizzando comandi standard.

## FunzionalitÃ 

- Connessione automatica a strumenti tramite modello, IDN o indirizzo.
- Lista di tutte le risorse disponibili con dettagli IDN (se supportati).
- Configurazione opzionale della verbositÃ  per abilitare/disabilitare i messaggi di debug.
- Gestione delle eccezioni personalizzata per rilevare errori di connessione.

## Installazione

Puoi installare la libreria direttamente con pip:

```bash
pip install instrument_connector
```

Se stai sviluppando localmente, puoi installarla in modalitÃ  editabile:

```bash
pip install -e .
```

## Utilizzo

### 1. Connessione a uno strumento

Puoi connetterti a uno strumento specificando il modello o un IDN parziale:

```python
import instrument_connector

try:
    # Connetti allo strumento specificando un modello
    instrument = instrument_connector.connect_to_instrument("2380")
    print("Connected to the instrument successfully!")
    print("Instrument IDN:", instrument.query("*IDN?"))
except instrument_connector.InstrumentConnectionError as e:
    print(f"Failed to connect: {e}")
```

### 2. Lista delle risorse disponibili

Per elencare tutte le risorse disponibili e ottenere informazioni sui dispositivi connessi:

```python
resources = instrument_connector.list_available_resources()
print("Available resources:")
for resource in resources:
    print(f"Address: {resource['address']}, IDN: {resource['idn']}")
```

### 3. Abilitare o disabilitare i messaggi di debug

Puoi configurare la libreria per stampare messaggi di debug durante l'esecuzione:

```python
instrument_connector.set_verbosity(True)  # Abilita messaggi di debug
instrument_connector.set_verbosity(False) # Disabilita messaggi di debug
```

## Dipendenze

La libreria richiede **PyVISA** per la gestione della connessione agli strumenti:

```bash
pip install pyvisa
```

## Licenza

Questo progetto Ã¨ distribuito sotto licenza MIT. Consulta il file [LICENSE](./LICENSE) per i dettagli.
maloident 2024.7.3.6
Model classes for the Marktlokation ID Identification API by EDI@Energy (manually fixed)
License: MIT
Requires Python: >=3.9
Keywords: BDEW, MaLo, MaLo Ident, Marktlokation

# MaLo Ident Python Models

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
![Python Versions (officially) supported](https://img.shields.io/pypi/pyversions/maloident.svg)
![Pypi status badge](https://img.shields.io/pypi/v/maloident)
![Unittests status badge](https://github.com/Hochfrequenz/malo-ident-python-models/workflows/Unittests/badge.svg)
![Coverage status badge](https://github.com/Hochfrequenz/malo-ident-python-models/workflows/Coverage/badge.svg)
![Linting status badge](https://github.com/Hochfrequenz/malo-ident-python-models/workflows/Linting/badge.svg)
![Black status badge](https://github.com/Hochfrequenz/malo-ident-python-models/workflows/Formatting/badge.svg)

This package provides mostly autogenerated [pydantic](https://docs.pydantic.dev/latest/)-based model classes for the MaLo ident API.

We also maintain a [C#/.NET Version of this data model](https://github.com/Hochfrequenz/malo-ident-net-models).

It does not provide you with an HTTP client.

## Installation

Install it from [PyPI](https://pypi.org/project/maloident)

```bash
pip install maloident
```

Then use it:

```python
from maloident.v1.models import ResultNegative

my_json = {
    "decisionTree": "E_0594",
    "responseCode": "A10",
    "reason": "Ich bin ein Freitext.",
    "networkOperator": 9900987654321,
}
result = ResultNegative.model_validate(my_json)
```

The request payload type for the Lieferant➡️Netzbetreiber identification request is `maloident.models.IdentificationParameter`.

See the [tests](unittests/test_models.py) for more examples.

## Project Structure

This project is based on [`datamodel-code-generator`](https://github.com/koxudaxi/datamodel-code-generator/).
Most of the classes are autogenerated from the [`openapi.yml`](openapi/v1/openapi.yml) which can be found on [SwaggerHub](https://app.swaggerhub.com/apis/edi-energy/MaLoIdent_2024-07-03/v1.0.0).

Note that we fixed some errors in the official OpenAPI spec.
Our changes are mentioned at the beginning of the [`openapi.yml`](openapi/v1/openapi.yml) file.

https://github.com/Hochfrequenz/malo-ident-python-models/blob/3cfe0aea3cff051303ef5e513d06ab6c5741f21a/openapi/openapi.yml#L4-L10

After updating the `openapi.yml` file, use

```bash
tox -e codegen
```

to re-generate the model classes.

## Contribute

You are very welcome to contribute to this template repository by opening a pull request against the main branch.