Skip to content
/ pyxis Public

An essential Python toolkit for peak productivity

License

Notifications You must be signed in to change notification settings

vitalibo/pyxis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyXIS

status

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

pip install 'git+https://github.com/vitalibo/[email protected]'

Usage

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

{2: ('foo', 'bar'), 3: ('baz',)}

About

An essential Python toolkit for peak productivity

Topics

Resources

License

Stars

Watchers

Forks

Languages