Skip to main content

A plugin extends power of attrs library.

Project description

https://travis-ci.org/MacHu-GWU/attrs_mate-project.svg?branch=master https://img.shields.io/badge/Star_Me_on_GitHub!--None.svg?style=social

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

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

This version
History Node

0.0.1

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 CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page