-
Notifications
You must be signed in to change notification settings - Fork 11
/
setup.py
77 lines (60 loc) · 2.39 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
from setuptools import setup
brief_description = """
.. image:: https://travis-ci.org/brennv/namedtupled.svg?branch=master
:target: https://travis-ci.org/brennv/namedtupled
.. image:: https://img.shields.io/badge/python-2.7%2C%203.4%2C%203.5-blue.svg
.. image:: https://img.shields.io/codecov/c/github/brennv/namedtupled.svg
:target: https://codecov.io/gh/brennv/namedtupled
Source: `https://github.com/brennv/namedtupled`_
Docs: `https://namedtupled.readthedocs.io`_
`namedtuples`_ are immutable, performant and classy. **namedtupled** is
a lightweight wrapper for recursively creating namedtuples from nested
dicts, lists, json and yaml. Inspired by `hangtwenty`_.
Installation
============
.. code:: bash
pip install namedtupled
Getting started
===============
.. code:: python
import namedtupled
data = {'binks': {'says': 'meow'}}
cat = namedtupled.map(data)
cat # NT(binks=NT(says='meow'))
cat.binks.says # 'meow'
.. _namedtuples: https://docs.python.org/3/library/collections.html
.. _hangtwenty: https://gist.github.com/hangtwenty/5960435
.. _https://github.com/brennv/namedtupled: https://github.com/brennv/namedtupled
.. _https://namedtupled.readthedocs.io: https://namedtupled.readthedocs.io
"""
setup(
name='namedtupled',
packages=['namedtupled'],
version='0.3.3',
description='Lightweight namedtuple wrapper for attribute-style data access (a la JavaScript objects).',
long_description=brief_description,
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
author='brennv',
author_email='[email protected]',
license='MIT',
url='https://github.com/brennv/namedtupled',
download_url='https://github.com/brennv/namedtupled/tarball/0.3.3',
keywords='namedtupled namedtuple json yaml attribute style data access javascript objects',
install_requires=[
'future',
'pyyaml',
],
include_package_data=True,
zip_safe=False)