An example package. Replace this with a proper project description. Generated with https://github.com/ionelmc/cookiecutter-pylibrary
Project description
Container class boilerplate killer.
Features:
Human-readable __repr__
Complete set of comparison methods
Keyword and positional argument support. Works like a normal class - you can override just about anything in the subclass (eg: a custom __init__). In contrast, hynek/characteristic forces different call schematics and calls your __init__ with different arguments.
Installation
pip install fields
Usage
>>> from fields import Fields >>> >>> class Pair(Fields.a.b): ... pass ... >>> p = Pair(1, 2) >>> p.a 1 >>> p.b 2 >>> class Node(Fields.value.left(None).right(None)): ... pass ... >>> p = Node(1, left=Node(2), right=Node(3, left=Node(4))) >>> p <Node(left=<Node(left=None, right=None, value=2)>, right=<Node(left=<Node(left=None, right=None, value=4)>, right=None, value=3)>, value=1)>
Documentation
Development
To run the all tests run:
tox
Changelog
0.1.0 (2014-06-08)
First release on PyPI.
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
Built Distribution
File details
Details for the file fields-0.1.0.tar.gz
.
File metadata
- Download URL: fields-0.1.0.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eace88c4ba89388c54039743c4a5fe8efb2f610120cfd8caca18f766bf03d582 |
|
MD5 | 10d1f8d7fcf5b94ff33d0bb5776dc226 |
|
BLAKE2b-256 | 9fea95dba455c643b71a9e363b71f9106672269309725846b82b532739a2bbf8 |
Provenance
File details
Details for the file fields-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: fields-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 914e02eef2badf017bc058c769ffdbb708dbf5ed0f91bcf0c3bd08f3f19e861e |
|
MD5 | 44801211e03f262a5c53d8e1487f47f6 |
|
BLAKE2b-256 | bbe878c2013d8cb36508dd0876fec3aa80221309bbc7b54d297905c51f5b4510 |