semvec/pypi-packages huggingface dataset:
pystream-collections 0.2.1
A helper library to manage collections more easily
License: MIT
Requires Python: <4.0,>=3.12

# PyStream - A library for managing collections more conveniently

Inspired by other language's features (e.g. Java's streaming API, or JavaScript functional traits on arrays),
this library helps you interact with collections or iterable objects, by easily chaining operations,
and collecting the results at the end (thus, having lazy-evaluation).

Some basic examples:

```python
from pystream.stream import Stream

Stream(2, 3, 5, 7, 11).skip(2).collect()  # [5, 7, 11]
Stream([1, 2, 3]).map(lambda x: x + 1).filter(lambda x: x > 2).collect()  # [3, 4]
```

You can also use the `.reduce()` function to obtain a final result based on a provided transformation function:

```python
>>> stream = Stream(("paris", "london", "stockholm")).map(str.title)
>>> stream.reduce(lambda w1, w2: f"{w1}, {w2}")
"Paris, London, Stockholm"
```

It's also possible to use a specific object to collect the results into (by default is a list). For example, if the
stream consists of key/value pairs, you can collect them into a dictionary:

```python
>>> Stream(("one", 1), ("two", 2), ("forty two", 42))
>>> stream.collect(dict)
{"one": 1, "two": 2, "forty two": 42}
```

## Asynchronous Code
This library supports working with coroutines and asynchronous iterators as well. Working with the built-in `map()`, and
`filter()` functions is great, and also the niceties of the `itertools` module, but there's no counterpart of these
capabilities for asynchronous code.

Instead, this more compact (and functional-like) object is provided, which can work like this:

```python
class Locker(NamedTuple):
    name: str
    size: str
    is_available: bool

async def _get_db_records() -> AsyncGenerator:
    yield Locker("park street 1", "L", False)
    yield Locker("Union street", "S", True)
    yield Locker("Main Square 12", "M", False)
    yield Locker("Central Station", "M", True)
    yield Locker("Central Station2", "L", True)
    yield Locker("Central Station3", "L", True)

>>> count = (
    await AsyncStream(_get_db_records())
    .filter(lambda locker: locker.is_available)
    .map(lambda locker: locker.size)
    .collect(Counter)
)
{"S": 1, "M": 1, "L": 2}
```

## Motivation
Missing the `itertools`-like capabilities is one of the most annoying things,
when working with asynchronous code.  In addition, adding another interface for
the programmer that allows chaining data structures, similar to how Unix
pipelines work, enables programmers to think more clearly about their programs.
telegram-bot-reporter 0.2.3
Library for sending messages and files using a Telegram bot.
License: MIT
Requires Python: <4.0,>=3.10

### Stack:

- [x] <a href="https://www.python.org/"><img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/python/python-plain.svg" alt="python" width="15" height="15"/>
  Python 3.10+ <br/></a>
- [x] <a href="https://github.com/projectdiscovery/httpx"><img src="https://user-images.githubusercontent.com/8293321/135731750-4c1d38b1-bd2a-40f9-88e9-3c4b9f6da378.png" alt="httpx" width="15" height="15"/>
  Httpx 0.27.0+ <br/>

### Installation

    pip install telegram-bot-reporter

### Usage Sync

    from telegram_bot_reporter import Bot

    bot = Bot(bot_token=TELEBOT_TOKEN, chat_id=CHAT_ID)

    # Send message
    bot.send_message('Hello, world')

    # Send file
    temp_file = Path('test.txt')
    with open(temp_file, mode='w', encoding='utf-8') as f:
        f.write('Test message')
    bot.send_document(temp_file)

    # Send long message (more than 4000 symbols)
    bot.send_message('Very long message over 4000 symbols', split_message=True)

### Usage Async

    from telegram_bot_reporter import AsyncBot

    bot = AsyncBot(bot_token=TELEBOT_TOKEN, chat_id=CHAT_ID)

    await bot.send_message('Hello, world')

    # Send file
    temp_file = Path('test.txt')
    with open(temp_file, mode='w', encoding='utf-8') as f:
        f.write('Test message')
    await bot.send_document(temp_file)

    # Send long message (more than 4000 symbols)
    await bot.send_message('Very long message over 4000 symbols', split_message=True)
verzeichnisdienst 0.1.0
Model classes for the Verzeichnisdienst API by EDI@Energy
License: MIT
Requires Python: >=3.9
Keywords: BDEW, EDI@Energy, Verzeichnisdienst

# Verzeichnisdienst Python Models

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
![Python Versions (officially) supported](https://img.shields.io/pypi/pyversions/verzeichnisdienst.svg)
![Pypi status badge](https://img.shields.io/pypi/v/verzeichnisdienst)
![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 Verzeichnisdienst API.

It does not provide you with an HTTP client.

## Installation

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

```bash
pip install verzeichnisdienst
```

Then use it:

```python
from verzeichnisdienst.v1.models import ApiRecord

my_json = {
    "providerId": "1234567890123",
    "apiId": "example",
    "majorVersion": 1,
    "url": "https://www.example.org/api/resource/v1",
    "additionalMetadata": None,
    "lastUpdated": "2024-10-01T00:00:00+00:00",
    "revision": 1,
    "status": "Test",
}
my_strongly_typed_record = ApiRecord.model_validate(my_json)
```

or

```python
from verzeichnisdienst.v1.websocket import Contact

my_json_contact = {
    "email": "verzeichnis@hochfrequenz.de",
    "phone": "0049123457890"
}
my_strongly_typed_contact = Contact.model_validate(my_json_contact)
```

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-docs/edi_energy/Verzeichnisdienst_Web-API_2024_10_01/1.0.0).

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.
pyhdtoolkit 1.7.0
An all-in-one toolkit package to ease my Python work in my PhD.
License: MIT
Requires Python: >=3.10
Keywords: Accelerator Physics, Docker, PHD, Physics Simulation, Visualisation

<h1 align="center">
  <b>PyhDToolkit</b>
</h1>

<p align="center">
  <!-- PyPi Version -->
  <a href="https://pypi.org/project/pyhdtoolkit">
    <img alt="PyPI Version" src="https://img.shields.io/pypi/v/pyhdtoolkit?label=PyPI&logo=PyPI">
  </a>

  <!-- Github Release -->
  <a href="https://github.com/fsoubelet/PyhDToolkit/releases">
    <img alt="Github Release" src="https://img.shields.io/github/v/release/fsoubelet/PyhDToolkit?color=blue&label=Release&logo=Github">
  </a>

  <br/>

  <!-- Github Actions Build -->
  <a href="https://github.com/fsoubelet/PyhDToolkit/actions?query=workflow%3A%22Cron+Testing%22">
    <img alt="Github Actions" src="https://github.com/fsoubelet/PyhDToolkit/workflows/Tests/badge.svg">
  </a>

  <!-- Docker Image -->
  <a href="https://hub.docker.com/r/fsoubelet/simenv">
    <img alt="Docker Image" src="https://img.shields.io/docker/image-size/fsoubelet/simenv?label=Docker&sort=date">
  </a>

  <!-- Code Coverage -->
  <a href="https://codecov.io/gh/fsoubelet/PyhDToolkit">
    <img src="https://codecov.io/gh/fsoubelet/PyhDToolkit/branch/master/graph/badge.svg?token=6SO90F2MJI"/>
  </a>

  <br/>

  <!-- Code style -->
  <a href="https://github.com/psf/Black">
    <img alt="Code Style" src="https://img.shields.io/badge/Code%20Style-Black-9cf.svg">
  </a>

  <!-- Linter -->
  <a href="https://github.com/astral-sh/ruff">
    <img alt="Linter" src="https://img.shields.io/badge/Linter-Ruff-ce963f.svg">
  </a>

  <!-- Build tool -->
  <a href="https://github.com/astral-sh/uv">
    <img alt="Build tool" src="https://img.shields.io/badge/Build%20Tool-uv-4e5dc8.svg">
  </a>

  <!-- Test runner -->
  <a href="https://github.com/pytest-dev/pytest">
    <img alt="Test runner" src="https://img.shields.io/badge/Test%20Runner-Pytest-ce963f.svg">
  </a>

  <!-- License -->
  <a href="https://github.com/fsoubelet/PyhDToolkit/blob/master/LICENSE">
    <img alt="License" src="https://img.shields.io/github/license/fsoubelet/PyhDToolkit?color=9cf&label=License">
  </a>
</p>

<p align="center">
  ♻️ An all-in-one package for Python work in my PhD ♻️
</p>

<p align="center">
  <!-- General DOI -->
  <a href="https://zenodo.org/badge/latestdoi/227081702">
    <img alt="DOI" src="https://zenodo.org/badge/227081702.svg">
  </a>
</p>

<p align="center">
  <a href="https://www.python.org/">
    <img alt="Made With Python" src="https://forthebadge.com/images/badges/made-with-python.svg">
  </a>
</p>

Link to [documentation].

## License

Copyright &copy; 2019 Felix Soubelet. [MIT License](LICENSE)

[documentation]: https://fsoubelet.github.io/PyhDToolkit/