semvec/pypi-packages huggingface dataset:
cardlink 1.0.4
Python SDK for Cardlink API
Requires Python: >=3.10
Keywords: Cardlink, Cardlink API, Payments, SDK, API

<p align="center">
  <img src="https://raw.githubusercontent.com/LaFTonTechnology/cardlink/main/assets/cardlinkLogo.png" width="300"/>
  <h1 align="center">cardlink</h1>
  <p align="center">Асинхронный Python клиент для <a href="https://cardlink.link/merchant/api">Cardlink API</a></p>
</p>

<p align="center">
  <a href="https://www.python.org/"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/LaFTonTechnology/cardlink/main/assets/python-version.json" alt="Python"></a>
  <a href="https://pydantic.dev"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydantic/pydantic/main/docs/badge/v2.json" alt="Pydantic v2"></a>
  <a href="https://docs.aiohttp.org/en/stable/"><img src="https://img.shields.io/badge/aiohttp-v3-2c5bb4?logo=aiohttp" alt="Aiohttp"></a>
</p>

---

## 📌 О проекте

**cardlink** — асинхронный Python клиент для работы с [Cardlink API](https://cardlink.link/merchant/api).  
Позволяет создавать счета, получать ссылки на оплату и обрабатывать платежи полностью асинхронно.

---

## [Документация](https://laftontechnology.github.io/cardlink/)

---

## 💬 Сообщество

Присоединяйтесь к нашему чату в Telegram: [@pythonCardlink](https://t.me/pythonCardlink)

---

## 🛠 Установка

```bash
pip install cardlink
```

## Quick start

```python
import asyncio
from cardlink import CardLink

async def main():
    cl = CardLink(token="YOUR_TOKEN", shop_id="YOUR_SHOP_ID")

    bill = await cl.create_bill(amount=100)
    return bill.link_page_url  # Ссылка для оплаты счёта

if __name__ == "__main__":
    print(asyncio.run(main()))
```


## 📦 Основные возможности

- ✅ Асинхронный клиент на `aiohttp`  
- ✅ Полная поддержка [Cardlink API](https://cardlink.link/merchant/api)  
- ✅ Быстрое создание счетов и получение ссылок для оплаты  
- ✅ Совместимость с Python 3.10+  

---

## 💖 Поддержка проекта

Вы можете поддержать разработку донатом:

| Сеть     | Адрес                                                                 |
|----------|-----------------------------------------------------------------------|
| **TON**  | `UQCekZTSqysK4OUQFovzI31CILQj0GGjnYxBV77HlK2Zv1BM`                    |
| **TRON** | `TVr8bD8toKF14YY46apFgS1PgiBBtvKsfu`                                  |
| **ETH**  | `0x6406D459D592456dA5E78D789b68029EC7950890`                           |

---

## 📝 Лицензия

Проект распространяется под лицензией MIT.

---

## 📌 Контакты и обратная связь

- Telegram: [@pythonCardlink](https://t.me/pythonCardlink)  
- GitHub Issues: открывайте любые баги или предложения прямо в репозитории.
tidylinq 0.2.0
Convenient LINQ-style table functions.
Requires Python: <4.0,>=3.11

# tidylinq

A set of utilities I've found useful when developing LLM tooling.

Usage:

```python
from pydantic import BaseModel, Field
from textwrap import dedent
from tidylinq import from_iterable, completion_with_schema, retry

class Translation(BaseModel):
    term_source: str = Field(description="The source language term")
    term_target: str = Field(description="The term translated to the target language.")
    example_source: str = Field(description="Example of using the term in the source language.")
    example_target: str = Field(description="Example sentence target to the target language.")

messages = [
    {
        "role": "system",
        "content": dedent("""
            You are an expert translator. Output a structured Japanese response in JSON format for the provided English words.
        """).strip(),
    },
]

translations = (
    from_iterable(["cat", "dog", "hyena"])
    .select(
        lambda w: retry(completion_with_schema, backoff=1.0)(
            model="gemini/gemini-2.5-flash",
            messages=messages + [{"role": "user", "content": w}],
            response_schema=Translation,
        ),
        parallelism=4,
    )
    .with_progress("Translating words")
)

results = translations.to_list()
for translation in results:
    print(f"English: {translation.term_source}")
    print(f"Japanese: {translation.term_target}")
    print(f"Example (EN): {translation.example_source}")
    print(f"Example (JP): {translation.example_target}")
```
tradejournal 0.1.0
Simple trade journal CLI
Requires Python: >=3.6

## TradeJournal

**TradeJournal** is a tiny command‑line utility for tracking individual trades, their risk parameters and the result (up / down) once the position is closed.  All data is stored locally in a SQLite database under the user’s home directory (`~/.tradejournal/tradejournal.db`).

### Features

* **Add trades** with symbol, quantity, execution price and optional risk.
* **List trades** – shows the most recent entries with derived columns (`Value`, `Downside`, `Upside`, etc.).
* **Mark completions** – indicate whether a trade closed *up* or *down*.  The profit is automatically calculated:
  * *up*: `profit = (price * (1 + risk*0.02) - price) * quantity`
  * *down*: `profit = (price * (1 - risk*0.01) - price) * quantity`
* **Completion list** – displays each completed trade together with its profit and a short summary showing **% Success** and **Net profit**.
* **Deletion** – remove a trade before it is completed.
* **Configuration** – a YAML file (`~/.tradejournal/config.yaml`) stores defaults such as `default_risk` and the column ordering used by the list view.
* **Rich tables** – colour‑coded columns (`green` for upside, `red` for downside, `magenta` for direction, etc.) make the output easy to read.

---

### Installation

1. Clone the repository and create a virtual environment (the project already ships a `venv311` but you can use any Python 3.11+ interpreter).
   ```bash
   git clone <repo-url>
   cd tradejournal
   python -m venv .venv
   source .venv/bin/activate
   pip install -e .
   ```
2. The console script defined in *pyproject.toml* installs a `trade` command.  Verify that it works:
   ```bash
   trade --help
   ```

---

### Usage

#### Add a trade
```bash
trade add -s AAPL -q 10 -p 150.0           # risk omitted → uses default_risk from config
trade add -s TSLA -q 5 -p 720 -r 3        # explicit risk value
```
The command prints the generated 16‑character trade ID.

#### List open trades
```bash
trade list               # shows all non‑completed trades
trade list -l 5          # limit to the five most recent entries
```
The table includes derived columns such as **Value**, **Downside**, **Upside**, **DownPrice**, **UpPrice** and a net‑summary table at the bottom.

#### Mark a trade as completed
```bash
trade complete up <trade_id>     # trade closed with profit
trade complete down <trade_id>   # trade closed with loss
```
The profit is stored and later displayed in the completions view.

#### View completions
```bash
trade complete list
```
The output shows each completed trade (ID, Symbol, Direction, Timestamp, Profit) and a two‑row summary containing:
* **% Success** – proportion of *up* completions.
* **Net profit** – sum of all profits (positive for up, negative for down).

#### Delete a trade
```bash
trade delete <trade_id>
```