diff --git a/README.md b/README.md index 150f850..6b2d9d7 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,15 @@ -Accessor: read nested dictionaries -================================== +# Accessor: read nested dictionaries Build accessor functions using the natural python dot notation. -Installation ------------- - +# Installation ``python-accessor`` is available as a zero-dependency Python package. Install with: $ pip install python-accessor -Usage ------ +## Usage ```python @@ -21,12 +17,9 @@ Usage name = _.users.name name(obj) # equvalent of obj['users']['name'] - - ``` -Examples --------- +## Examples ```python @@ -71,8 +64,7 @@ list(filter(_.uid > 300, obj['users'])) # -> [{'uid': 3456}] ``` -More Examples! :) ------------------ +## More Examples! :) ```python diff --git a/accessor/__init__.py b/accessor/__init__.py index b47df08..f243454 100644 --- a/accessor/__init__.py +++ b/accessor/__init__.py @@ -1,6 +1,6 @@ -"""This is a docstring. +"""Access nested dictionaries. -Two lines +Create functions to manipulate dictionaries smililar to itemgetter. """ from functools import wraps @@ -102,7 +102,7 @@ def select(*getters, **name_getters): def normalize(data, c_getter, select, c_select): - """Normalize" semi-structured JSON data into a flat table. + """Normalize semi-structured JSON data into a flat table. Parameters ---------- diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..ed1700c --- /dev/null +++ b/setup.cfg @@ -0,0 +1,3 @@ +[metadata] +long_description = file: README.md +long_description_content_type = text/markdown diff --git a/setup.py b/setup.py index d5d0a58..a3ac87b 100644 --- a/setup.py +++ b/setup.py @@ -3,14 +3,12 @@ from setuptools import setup, find_packages setup( - name='Accessor', + name='python-accessor', version='0.0.1', description='Access nested dicts', - long_description=open('README.md').read(), author='Jakub Jagielka', author_email='jjagielka@gmail.com', url='https://github.com/jjagielka/python-accessor', - license=open('LICENSE').read(), packages=find_packages(exclude=('tests', 'docs')), classifiers=[ 'Development Status :: 3 - Alpha',