# Lens 1.1.5

## Purpose

The purpose of this project is to implement the "Lens" functional pattern in Python and supply that implementation as a package that can be imported into any other python project.


## Install

    pip install simplelens

## Uninstall

    pip uninstall simplelens

## Usage
Install the package from PyPi via pip install  
`import lens`

The lens function expects a collection of some form, as well as a list of keys and/or indexes to use to extract data 
from the collection.

    collection = {'a': {'b': [{'a': 1}, {'b': 2}, {'c': 3}]
    lens.focus(collection, ['a', 'b', 2, 'c'])
    #=> 3


## Changelog
  See changelog here: [Changelog.md](changelog.md)


## License

Copyright 2024 Nathan Menge - nathan.menge@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
