semvec/pypi-packages huggingface dataset:
classic-falcon-integration 1.0.2
Provides integrations of classic libs with Falcon web framework
Requires Python: >=3.10

# Classic Falcon Integration

Предоставляет простую интеграцию веб-фреймворка 
[Falcon](https://falcon.readthedocs.io/en/stable/),
[SpecTree](https://spectree.readthedocs.io/en/latest/index.html),
[orjson](https://github.com/ijl/orjson)
и [classic-error-handling](https://github.com/variasov/classic-error-handling).

## Установка

```bash
pip install classic-falcon-integration
```

## Quickstart

```python
from falcon import App, Request, Response
from spectree import Response as Responses
from pydantic import BaseModel
import waitress

from classic.components import component
from classic.falcon_integration import specification, register_all
from classic import db_tools


class Pet(BaseModel):
    id: int
    name: str
    age: int


class FilterPets(BaseModel):
    name__contains: list[str] | None = None
    age__le: int | None = None
    age__gt: int | None = None
    id: int | None = None


class NewPet(BaseModel):
    name: str
    age: int


@component
class PetsResource:
    db: db_tools.Engine

    @specification(
        query=FilterPets,
        resp=Responses(
            HTTP_200=list[Pet],
        ),
        operation_id='find_pets',
        tags=['pets'],
    )
    def on_get(self, request: Request, response: Response):
        # Валидация по спецификации отключена по умолчанию,
        # потому вызов валидации обязательно добавлять вручную.
        # Валидацию лучше сего проводить через model_validate,
        # так как далее данные все равно будут переданы в виде dict
        FilterPets.model_validate(request.params)

        # Здесь приведен пример работы с БД с classic-db-tools,
        # но здесь может быть что угодно
        with self.db:
            response.media = self.db.queries.filter_pets(
                **request.params
            ).return_as(
                db_tools.ToCls(Pet, id='id'),
                returns=Pet,
            ).many()

    @specification(
        json=NewPet,
        resp=Responses(
            HTTP_200=Pet,
        ),
        tags=['pets'],
    )
    def on_post(self, request: Request, response: Response):
        NewPet.model_validate(request.media)
        with self.db:
            response.media = self.db.queries.save_pet(
                **request.media,
            )


if __name__ == '__main__':
    app = App()
    app.add_route('/api/pets', PetsResource())
    register_all(app)

    waitress.serve(
        app,
        host='127.0.0.1',
        port='8000',
    )
```
HL-MakePIP 0.1.1
Library to setup and export HL project environments to PIP.
Requires Python: >=3.9

# HL-MakePIP
Makes a project pip project


pip install "git+https://github.com/USERNAME/REPO_NAME.git@BRANCH_OR_TAG"


ENTRY POINTS:
setup_project_env() - Sets up the project env. (pyproject.toml) User customizes.
build_project() - Builds the project into a proper environment.
register_to_test_pypi() - Registers to test PYPI. Requires API Key.
register_to_pypi() - Registers to PYPI. Requires API Key.


Future experimentation w/ github workflows. 
- Workflow creation automated. (.github/workflows/publish.yml) already.
- Exact workflow to compile succuessfully w/ "Trusted Publisher" automatically not figured out.

RQS NOT Automated.
tree-py-shiso 0.2.0
A Python implementation of the tree command for Windows
Requires Python: >=3.8

# tree-py

[![PyPI version](https://badge.fury.io/py/tree-py-shiso.svg)](https://badge.fury.io/py/tree-py-shiso)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![GitHub stars](https://img.shields.io/github/stars/Tinnci/tree-py?style=social)](https://github.com/Tinnci/tree-py)

A Python implementation of the `tree` command, designed for Windows but compatible with other platforms. It provides a feature-rich command-line utility to recursively list directories in a tree-like format.

## Installation

```bash
uv tool install tree-py-shiso
```

## Usage

```bash
tree-py [options] [directory]
```

### Common Options

| Flag | Description |
| :--- | :--- |
| `-L <level>` | Max display depth of the directory tree. |
| `-d` | List directories only. |
| `-a` | All files are listed (including hidden files). |
| `-f` | Print the full path prefix for each file. |
| `-i` | Makes tree not print the indentation lines. |
| `-h` | Print the size in a human readable way. |
| `-p` | Print the file type and permissions. |
| `-C` | Turn colorization on always. |
| `-I <pattern>` | Do not list files that match the given pattern. |
| `-P <pattern>` | List only those files that match the pattern. |
| `--prune` | Prune empty directories from the output. |
| `--dirsfirst` | List directories before files. |

### Examples

**Project Overview:**
```bash
tree-py -L 2 -I "node_modules|__pycache__" --dirsfirst
```

**Find specific files:**
```bash
tree-py -P "*.json" --prune
```

**Flat list with full paths:**
```bash
tree-py -i -f
```
perexchange 1.0.0
Library for fetching Peruvian exchange rates
Requires Python: >=3.9

# [pkg]: perexchange

Core library for fetching PEN-USD exchange rates from Peruvian exchange houses. To install
it, run:

```bash
pip install perexchange
```

The library provides a single async function that fetches rates from multiple sources
concurrently:

```python
import asyncio
import perexchange as px

async def main():
    rates = await px.fetch_rates()
    best = min(rates, key=lambda r: r.buy_price)
    print(f"{best.name}: S/{best.buy_price}")

asyncio.run(main())
```

## Fetching rates

Call `fetch_rates()` to retrieve current rates. By default it queries all available
sources: cambioseguro, cuantoestaeldolar, tkambio, tucambista, and westernunion. The
function returns a list of `ExchangeRate` objects.

```python
rates = await px.fetch_rates()
```

You can fetch from specific sources by passing a list of house names. This is useful when
you only need rates from certain providers or want to reduce latency:

```python
rates = await px.fetch_rates(houses=["tkambio", "tucambista"])
```

The function accepts timeout and retry parameters. Timeout applies per house, not to the
entire operation. Retries only trigger on network errors, not parsing failures:

```python
rates = await px.fetch_rates(timeout=15.0, max_retries=5)
```

Failed sources are silently skipped. The function returns whatever rates it successfully
fetched, or an empty list if everything fails. Network errors trigger automatic retries
with exponential backoff. Parsing errors fail immediately.

## Working with rates

Each `ExchangeRate` contains the house name, buy and sell prices, and a UTC timestamp. Buy
price is what you pay in soles to buy dollars. Sell price is what you receive in soles
when selling dollars. The object is a frozen dataclass:

```python
rate = rates[0]
name = rate.name
buy = rate.buy_price
sell = rate.sell_price
when = rate.timestamp
spread = rate.spread
```

The spread property returns the difference between sell and buy prices. Some sources
return multiple tiers with different rates based on transaction amount, like
`tkambio_5000` and `tkambio_10000`.

Find the best rates by sorting or filtering the list:

```python
best_buy = min(rates, key=lambda r: r.buy_price)
best_sell = max(rates, key=lambda r: r.sell_price)
recent = [r for r in rates if (datetime.now(timezone.utc) - r.timestamp).seconds < 300]
```

## Error handling

Invalid house names raise `ValueError` immediately. All other failures are silent. Check
the returned list to see what succeeded:

```python
try:
    rates = await px.fetch_rates(houses=["nonexistent"])
except ValueError as e:
    print(f"Unknown house: {e}")

rates = await px.fetch_rates()
if not rates:
    print("All sources failed")
```

The library doesn't distinguish between different failure types. A house might fail due to
network issues, API changes, or parsing errors. Failed requests don't pollute your results
or logs.
flamepy 0.5.0
Python SDK for Flame, a distributed system for Agentic AI
Requires Python: >=3.12
Keywords: distributed system, agentic ai, flame, sdk

# Flame Python SDK

Python SDK for the Flame, a distributed system for Agentic AI.

## Installation

```bash
pip install flamepy
```

## Quick Start

```python
import asyncio
import flamepy

async def main():
    # Create a session with the application, e.g. Agent
    session = await flamepy.create_session("flmping")
    
    # Create and run a task
    resp = await session.invoke(b"task input data")

    # Handle the output of task
    print(resp.output)

    # Close session
    await session.close()

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

## API Reference

### Session

Represents a computing session with application, e.g. Agent, Tools.

```python
# Create a session
session = await flamepy.create_session("my-app")

# Close a session
await session.close()
```

### Task

Represents individual computing tasks within a session.

```python
# Create a task
task = await session.invoke(b"input data")

# Get task status
task = await session.get_task(task.id)

# Watch task progress
async for update in session.watch_task(task.id):
    print(f"Task state: {update.state}")
    if update.is_completed():
        break
```

## Error Handling

The SDK provides custom exception types for different error scenarios:

```python
from flamepy import FlameError, FlameErrorCode

try:
    session = await flamepy.create_session("flmping")
except FlameError as e:
    if e.code == FlameErrorCode.INVALID_CONFIG:
        print("Configuration error:", e.message)
    elif e.code == FlameErrorCode.INVALID_STATE:
        print("State error:", e.message)
```

## Development

To set up the development environment:

```bash
# Clone the repository
git clone https://github.com/xflops/flame.git
cd flame/sdk/python

# Install in development mode
pip install -e .[dev]

# Run tests
pytest

# Format code
black flamepy/
isort flamepy/

# Type checking
mypy flamepy/
```