Skip to main content

A plugin extends power of attrs library.

Project description!--None.svg?style=social

Welcome to attrs_mate Documentation


import attr
from attrs_mate import AttrsClass

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")])


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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
attrs_mate-0.0.1-py2-none-any.whl (5.6 kB) Copy SHA256 hash SHA256 Wheel py2 Oct 10, 2017
attrs_mate-0.0.1.tar.gz (5.8 kB) Copy SHA256 hash SHA256 Source None Oct 10, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page