semvec/pypi-packages huggingface dataset:
aws_lambda_stream 1.3.1
Create stream processors with AWS Lambda functions
Requires Python: <4.0,>=3.8

# aws-lambda-stream

This a python version of [aws-lambda-stream](https://github.com/jgilbert01/aws-lambda-stream) using [ReactiveX](https://github.com/ReactiveX/RxPY)


## Installation
With `pip` installed, run:

````
pip install aws-lambda-stream
````

With `poetry`, run:
````
poetry add aws-lambda-stream
````

## Project Templates
The following project templates are provided to help get your event platform up and running:

* event hub
* event-lake-s3
* event-fault-monitor
* rest-bff-service
* control-service


Create your own project using the Serverless Framework, such as: `sls create --template-url https://github.com/clandro89/aws-lambda-stream/tree/master/templates/event-hub --path myprefix-event-hub`


## Credits
- [aws-lambda-stream](https://github.com/jgilbert01/aws-lambda-stream)

## License
This library is licensed under the MIT License. See the LICENSE file.
propy-alamstein 0.1.2
Final Project for Matt Harrison / MetaSnake's 'Professional Python' Course
Requires Python: >=3.10

# Small Language Model

Final project for Matt Harrison / MetaSnake's [Professional Python](https://store.metasnake.com/propy) course.

The core code in this repo is the class `SmallLanguageModel` in the file `small_language_model.py`. However, that code is largely irrelevant, and exists just as a vehicle for us to explore modern tools used in Python development:

  * `uv` instead of `pip` for installing packages
  * LLMs to write code
  * Automated tests with `pytest`
  * Type Annotations
  * pre-commit and GitHub Actions to automate testing, linting with `ruff`, etc.
  * Deploying a package to PyPI

If, despite the above warning, you still want to run the code in this repo, you can do so like this:

```python
from propy_alamstein.small_language_model import SmallLanguageModel

slm = SmallLanguageModel()
slm.train("The quick brown fox jumped over the lazy dogs")

slm.predict_next("a")
slm.get_character_training_frequency()
```
py-packed-struct 0.6
An implementation of C-like packed structures in Python
Requires Python: >=3.5

# py-packed-struct
An implementation of C-like packed structures in Python based on the [`bitstruct`](https://bitstruct.readthedocs.io/en/latest/index.html) package

**py-packed-struct** allows to define C-like structures in an elegant way and to convert them into `bytes` objects without having to specify the format as required by `struct`:
```python
# with struct
>>> from struct import *
>>> one, two, three = 1, 2, 3
>>> pack(">bhl", one, two, three)
b'\x01\x00\x02\x00\x00\x00\x03'

# with py-packed-struct
>>> from packed_struct import *
>>> s = Struct({"one": c_signed_int(8), "two": c_signed_int(16), "three": c_signed_int(32) })
>>> s.set_data(one = 1, two = 2, three = 3)
>>> serialized = s.pack(byte_endianness="big")
>>> print(serialized)
b'\x01\x00\x02\x00\x00\x00\x03'
>>>
>>> s.unpack(serialized)
>>> {'one': 1, 'two': 2, 'three': 3}
```
Who needs to remember struct format strings? :)

In addition, **py-packed-struct** allows to work with bit-fields and nested structures (see [examples](https://github.com/lu-maca/py-packed-struct/tree/main/examples)).

Installation
----
```bash
pip install py-packed-struct
```

Supported features
----
- C-like struct
- bit-fields handling
- byte endianess
- (TODO) bit endianness


Example
----
This example can be found in [`example/mqtt`](https://github.com/lu-maca/py-packed-struct/tree/main/examples/mqtt). `publisher.py` publishes a message on a MQTT topic and `subscriber.c` is subscribed to that topic. The publisher publishes the following structure:
```python
person = Struct(
    {
        "name": c_char(10*8),
        "age": c_unsigned_int(8),
        "weight": c_float(32),
        "dresses": Struct(
            {
                "tshirt": c_char(10*8),
                "shorts": c_char(10*8),
                "shoes": Struct(
                    {
                        "number": c_unsigned_int(8),
                        "brand": c_char(10*8)
                    }
                )
            }
        )
    }
)
# set data values
person.set_data(name="Luca", age=29, weight=76.9)
person.dresses.set_data(tshirt="foo", shorts="boo")
person.dresses.shoes.set_data(number=42, brand="bar")
```
The subscriber copies the incoming buffer in the following `struct`:
```c
typedef struct __attribute__((packed)) {
	uint8_t number;
	char brand[10];
} shoes_t;

typedef struct __attribute__((packed)) {
	char tshirt[10];
	char shorts[10];
	shoes_t shoes;
} clothes_t;

typedef struct __attribute__((packed)) {
	char name[10];
	uint8_t age;
	float weight;
	clothes_t clothes;
} person;
```

The result is the following:

![example mqtt](https://github.com/lu-maca/py-packed-struct/assets/65252677/997cadce-d79d-4117-b693-dc025957ebf9)
python-kv 0.3.11
Async key-value store ABC. Implementations over SQLAlchemy, the filesystem, Redis, Azure Blob, and more.
Requires Python: >=3.10

# KV

`KV` is an async key-value store interface for Python. It provides a simple API to store serializable objects.

```bash
pip install python-kv
```

`KV` supports multiple backends, including the filesystem, SQLite, Redis, Azure Blob, and many more.

```python
from kv import KV

kv = KV.of('sql+sqlite:///path/to/db.sqlite', type=dict) 

await kv.insert('hello', {'world': 42})
await kv.read('hello') # {'world': 42}
await kv.delete('hello')
async for k, v in kv.items():
  ...
await kv.clear()
```

[**Read the docs!**](https://marciclabas.github.io/kv/)