semvec/pypi-packages huggingface dataset:
balancing-services-cli 1.6.0.post6
CLI for accessing European electricity balancing market data via the Balancing Services REST API
License: MIT
Requires Python: >=3.10
Keywords: api, balancing, cli, electricity, energy, europe, grid, imbalance, market, power

# balancing-services-cli

Command-line interface for the [Balancing Services REST API](https://balancing.services) - access European electricity balancing market data directly from your terminal.

## Installation

```bash
uv add balancing-services-cli
```

Or with pip:

```bash
pip install balancing-services-cli
```

Or run without installing via `uvx`:

```bash
uvx balancing-services-cli imbalance-prices --area EE --start 2025-01-01T00:00:00Z --end 2025-01-02T00:00:00Z
```

## Authentication

Provide your API token via the `--token` option:

```bash
bs-cli --token your-token-here imbalance-prices --area EE --start 2025-01-01T00:00:00Z --end 2025-01-02T00:00:00Z
```

## Usage

```bash
# CSV to stdout (default)
bs-cli imbalance-prices --area EE --start 2025-01-01T00:00:00Z --end 2025-01-02T00:00:00Z

# Save to CSV file
bs-cli imbalance-prices --area EE --start 2025-01-01T00:00:00Z --end 2025-01-02T00:00:00Z -o prices.csv

# Save to Parquet
bs-cli imbalance-prices --area EE --start 2025-01-01T00:00:00Z --end 2025-01-02T00:00:00Z -o prices.parquet

# Balancing energy commands (require --reserve-type)
bs-cli energy-prices --area EE --start 2025-01-01T00:00:00Z --end 2025-01-02T00:00:00Z --reserve-type aFRR
bs-cli energy-bids --area EE --start 2025-01-01T00:00:00Z --end 2025-01-02T00:00:00Z --reserve-type mFRR

# Balancing capacity commands (require --reserve-type)
bs-cli capacity-prices --area EE --start 2025-01-01T00:00:00Z --end 2025-01-02T00:00:00Z --reserve-type aFRR
bs-cli capacity-bids --area EE --start 2025-01-01T00:00:00Z --end 2025-01-02T00:00:00Z --reserve-type FCR
```

## Commands

| Command | Description |
|---|---|
| `imbalance-prices` | Imbalance prices |
| `imbalance-volumes` | Imbalance total volumes |
| `energy-activated` | Balancing energy activated volumes |
| `energy-offered` | Balancing energy offered volumes |
| `energy-prices` | Balancing energy prices |
| `energy-bids` | Balancing energy bids (auto-paginates) |
| `capacity-bids` | Balancing capacity bids (auto-paginates) |
| `capacity-prices` | Balancing capacity prices |
| `capacity-procured` | Balancing capacity procured volumes |
| `capacity-cross-zonal` | Cross-zonal capacity allocation |

## Output Formats

- **CSV** (default): Written to stdout or file. Use with Excel, DuckDB, Polars, pandas, etc.
- **Parquet**: Must specify `-o file.parquet`.


## Global Options

| Option | Description |
|---|---|
| `--token` | API bearer token |
| `-o, --output` | Output file path (auto-detects format from `.csv`/`.parquet` extension) |
| `-f, --format` | Override output format (`csv`, `parquet`) |
topsis-kashish-102316021 1.0.0
TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) implementation in Python
License: MIT
Requires Python: >=3.8

# topsis_kashish_102316021

## TOPSIS - Technique for Order of Preference by Similarity to Ideal Solution

TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) is a multi-criteria decision-making method used to rank alternatives based on multiple criteria.

The best alternative is the one that:
- Has the shortest distance from the ideal best solution
- Has the farthest distance from the ideal worst solution

This project provides a command-line implementation of the TOPSIS method in Python.

---

## Installation

### Install from PyPI

```bash
pip install topsis_kashish_102316021
```

### Install Locally (from project directory)

```bash
pip install .
```

---

## Usage

### Command Line

```bash
topsis_kashish_102316021 <input_file> <weights> <impacts> <output_file>
```

### Parameters

- `input_file` → CSV file containing alternatives and criteria
- `weights` → Comma-separated numeric weights (e.g., `"1,1,1,1,1"`)
- `impacts` → Comma-separated impacts:
  - `+` for benefit criteria
  - `-` for cost criteria
- `output_file` → Output CSV file containing results

---

### Example

```bash
topsis_kashish_102316021 data.csv "1,1,1,1,1" "+,+,-,+,+" result.csv
```

---

## Python API Usage

You can also use the package inside Python:

```python
from topsis_kashish_102316021 import topsis

topsis(
    "data.csv",
    ["1", "1", "1", "1", "1"],
    ["+", "+", "-", "+", "+"],
    "result.csv"
)
```

---

## Input Format

- The first column must contain alternative names.
- Remaining columns must contain numeric criteria values.
- No missing values are allowed.

### Example Input File

```csv
Object,Criteria1,Criteria2,Criteria3,Criteria4,Criteria5
Option1,25,50,12,200,45
Option2,30,60,10,180,50
Option3,20,45,15,220,40
```

---

## Output Format

The output CSV file includes:

- Original data
- `Topsis Score` (value between 0 and 1; higher is better)
- `Rank` (1 indicates the best alternative)

### Example Output

```csv
Object,Criteria1,Criteria2,Criteria3,Criteria4,Criteria5,Topsis Score,Rank
Option1,25,50,12,200,45,0.534,3
Option2,30,60,10,180,50,0.782,1
Option3,20,45,15,220,40,0.654,2
```

---

## Validation Checks

The program validates:

- Number of weights must match number of criteria
- Number of impacts must match number of criteria
- Impacts must be either `+` or `-`
- Criteria columns must contain numeric values only

---

## Technologies Used

- Python
- NumPy
- Pandas
- setuptools

---