https://github.com/vitalibo/pyxis
An essential Python toolkit for peak productivity
https://github.com/vitalibo/pyxis
config enum monad python3 stream-api
Last synced: 4 months ago
JSON representation
An essential Python toolkit for peak productivity
- Host: GitHub
- URL: https://github.com/vitalibo/pyxis
- Owner: vitalibo
- License: mit
- Created: 2023-01-30T01:01:52.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-22T10:03:12.000Z (over 1 year ago)
- Last Synced: 2024-12-27T21:21:48.183Z (about 1 year ago)
- Topics: config, enum, monad, python3, stream-api
- Language: Python
- Homepage:
- Size: 172 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# PyXIS

Pyxis is a comprehensive Python toolkit designed to enhance developer productivity.
It offers a suite of tools and classes that streamline various aspects of software development.
From data stream processing to advanced configuration management, Pyxis provides an array of functionalities
to tackle complex challenges efficiently.
### Installation
```bash
pip install 'git+https://github.com/vitalibo/pyxis.git@0.2.1'
```
### Usage
```python
from dataclasses import dataclass
from pyxis.dataclasses import reference
from pyxis.streams import Stream
@reference
@dataclass
class User:
name: str
age: int
users = Stream \
.of(User('foo', 25), User('bar', 22), User('baz', 30)) \
.key_by(lambda user: user.age // 10) \
.group_by_key(User.name) \
.to_dict()
print(users)
```
Output
```text
{2: ('foo', 'bar'), 3: ('baz',)}
```