A plugin extends power of attrs library.
Project description
Welcome to attrs_mate Documentation
Usage:
import attr from attrs_mate import AttrsClass @attr.s class User(AttrsClass): id = attr.ib() name = attr.ib() user = User(id=1, name="Alice") user.keys() # ["id", "name"] user.values() # [1, "Alice"] user.items() # [("id", 1), ("name": "Alice")] user.to_dict() # {"id": 1, "name": "Alice"} user.to_OrderedDict() # OrderedDict([("id", 1), ("name": "Alice")])
Quick Links
Install
attrs_mate is released on PyPI, so all you need is:
$ pip install attrs_mate
To upgrade to latest version:
$ pip install --upgrade attrs_mate
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
attrs_mate-0.0.1.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for attrs_mate-0.0.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab9dc1aea5c63b379910be2a185a6fff37a1d65917a7ebf2eb49e57c0c05dd55 |
|
MD5 | 79d1561ddffad213890d6752f9a24633 |
|
BLAKE2b-256 | c952e6ad39a34a47f85be2653bf6a266e803c70f966181d869f6828fb580296e |