Skip to content

Commit

Permalink
Added examples in README
Browse files Browse the repository at this point in the history
  • Loading branch information
bharadwajyarlagadda committed Oct 11, 2016
1 parent c7177dc commit 05bacb0
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ Changelog
=========


- ``FIX``: Added description for the package in ``setup.py``.
- ``FIX``: Added keywords in ``setup.py``.


v0.1.0 (2016-10-10)
-------------------

Expand Down
30 changes: 30 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,36 @@ Features

- Supported on Python 2.7 and Python 3.3+.

Quickstart
==========

Install using pip:

::

pip install sugar.py


.. code-block:: python
>>> import sugar
>>> float(sugar.average([1, 2, 3]))
2.0
>>> sugar.construct(4, lambda x: x * 2)
[0, 2, 4, 6]
>>> count([1, 2, 3, 3], 3)
2
>>> sugar.subtract([1, 2, 3], 2)
[1, 3]
>>> sugar.subtract ([1, 2, 3], [1, 3])
[2]
>>> sugar.subtract([1, 2, 3], 4)
[1, 2, 3]
.. |version| image:: https://img.shields.io/pypi/v/sugar.py.svg?style=flat-square
:target: https://pypi.python.org/pypi/sugar.py/
Expand Down

0 comments on commit 05bacb0

Please sign in to comment.