semvec/pypi-packages huggingface dataset:
pyboj 0.3.0
Beginner-friendly Python client for the Bank of Japan Time-Series Statistics API
Requires Python: >=3.10
Keywords: api, bank-of-japan, boj, pyboj, statistics, time-series

# pyboj

Beginner-friendly Python client for the [Bank of Japan Time-Series Statistics API](https://www.stat-search.boj.or.jp/).

[![PyPI](https://img.shields.io/pypi/v/pyboj)](https://pypi.org/project/pyboj/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/obichan117/pyboj/blob/main/examples/quickstart.ipynb)

Built on top of [boj-ts-api](https://pypi.org/project/boj-ts-api/) for advanced users who need direct API access.

## Installation

```bash
pip install pyboj
```

## Quick Start

```python
from pyboj import BOJ, Currency, Frequency

boj = BOJ()

# Exchange rates — no magic strings
rates = boj.exchange_rates(
    currency=Currency.USD_JPY,
    frequency=Frequency.D,
    start_date="202401",
)
for r in rates:
    print(r.currency_pair, r.rate_type, r.values[:3])
    df = r.to_dataframe()  # pandas DataFrame

# Interest rates
rates = boj.interest_rates(frequency=Frequency.D)
for r in rates:
    print(r.rate_category, r.collateralization, r.tenor)

# TANKAN survey
from pyboj import TankanIndustry, TankanSize
results = boj.tankan(
    industry=TankanIndustry.MANUFACTURING,
    size=TankanSize.LARGE,
)

# Price indices
indices = boj.price_indices(start_date="202401")

# Balance of payments, Money/Deposits, Loans, and more
bop = boj.balance_of_payments()
money = boj.money_deposits()
loans = boj.loans()
```

See the [full documentation](https://obichan117.github.io/pyboj/) for all 14 methods, filter enums, and domain wrapper properties.

## License

MIT
yaml-to-schemdraw 0.1.2
Generate schemdraw diagrams from YAML files or Python dictionaries.
Requires Python: >=3.11

# yaml-to-schemdraw

Generate schemdraw diagrams from YAML files or Python dictionaries.

`pip install yaml-to-schemdraw`

- [yaml-to-schemdraw](#yaml-to-schemdraw)
  - [Usage](#usage)
  - [Why?](#why)
  - [How it works](#how-it-works)

The following YAML spec:

```yaml
V1:
  - elements.SourceV
  - label: ["5V"]

line1:
  - elements.Line
  - right: [0.75]

S1:
  - elements.SwitchSpdt2: [{ action: close }]
  - up
  - anchor: ["b"]
  - label: ["$t=0$", { loc: rgt }]

line2:
  - elements.Line
  - right: [0.75]
  - at: ["S1.c"]

R1:
  - elements.Resistor
  - down
  - label: ["$100\\Omega$"]
  - label: [["+", "$v_o$", "-"], { loc: bot }]

line3:
  - elements.Line
  - to: ["V1.start"]

C1:
  - elements.Capacitor
  - at: ["S1.a"]
  - toy: ["V1.start"]
  - label: ["1$\\mu$F"]
  - dot
```

Represents the equivalent Python code:

```python
with schemdraw.Drawing() as d:
    V1 = elm.SourceV().label('5V')
    elm.Line().right(d.unit*.75)
    S1 = elm.SwitchSpdt2(action='close').up().anchor('b').label('$t=0$', loc='rgt')
    elm.Line().right(d.unit*.75).at(S1.c)
    elm.Resistor().down().label(r'$100\Omega$').label(['+','$v_o$','-'], loc='bot')
    elm.Line().to(V1.start)
    elm.Capacitor().at(S1.a).toy(V1.start).label(r'1$\mu$F').dot()
```

And can be loaded with this library as follows:

## Usage

```python
from yaml_to_schemdraw import from_yaml_file
# "from_yaml_string" and "from_dict" are also available

diagram = from_yaml_file("diagram.yaml")
```

You can now call `diagram.draw()` or `diagram.save("diagram.svg")` as usual.

![diagram](https://i.imgur.com/89mZNP1.png)

## Why?

Schemdraw was always intended to be used as a Python library, with developers manually writing diagrams in code.

However, when it comes to accepting diagram definitions provided by clients through the network or originating from an untrusted environment, the naive approach of running arbitrary Python code with a function like `exec()` poses a significant security risk.

This module proposes an alternative, declarative way to represent Schemdraw diagrams as a YAML file or a Python dictionary.

## How it works

The module parses the dictionary and resolves the function calls against the schemdraw library.

Internally, it uses `getattr()` to resolve function calls, with an attribute allowlist to prevent module escalation.

It can easily and safely parse most of the [schemdraw circuit gallery](https://schemdraw.readthedocs.io/en/stable/gallery/index.html).

If you encounter any valid diagrams that cannot be parsed (or easily adapted into something that this module can parse), please open an issue.
pyhems 0.3.0
ECHONET Lite library for Home Energy Management System (HEMS)
Requires Python: >=3.13

# pyhems

[![Python Version](https://img.shields.io/badge/python-3.13%2B-blue)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)

ECHONET Lite library for Home Energy Management System (HEMS).

**[🇯🇵 日本語ドキュメント](README.ja.md)**

## Features

- ECHONET Lite frame encoding/decoding
- UDP multicast device discovery
- Async runtime client with event subscription
- Entity definitions based on MRA data
- Full type hints (`py.typed`)

## Requirements

- Python 3.13+
- bidict>=0.23.0

## License

MIT License

## Installation

```bash
pip install pyhems
```

## Quick Start

```python
import asyncio
from pyhems.runtime import HemsClient, HemsInstanceListEvent

async def main():
    client = HemsClient(interface="0.0.0.0")
    await client.start()

    def on_event(event):
        if isinstance(event, HemsInstanceListEvent):
            print(f"Node: {event.node_id}, Instances: {event.instances}")

    unsubscribe = client.subscribe(on_event)
    await asyncio.sleep(60)
    unsubscribe()
    await client.stop()

asyncio.run(main())
```