Skip to main content

Resolves deeply-nested dictionary properties via dot-notation

Project description

# selectn-py [![Build Status](http://img.shields.io/travis/srn/selectn-py.svg?style=flat-square)](https://travis-ci.org/srn/selectn-py)

> Resolves deeply-nested dictionary properties via dot-notation

Inspired by the node library [selectn](https://github.com/wilmoore/selectn.js)

So you can do:

```python
selectn('info.name.full', person);
```

instead of:

```python
person and person.get('info').get('name').get('full')
```

## Install

```sh
$ pip install selectn-python
```

## Usage

```python
from selectn import selectn

dic = {'ay': {'yo'}}

selectn('info.name.full', dic)
```

## License

MIT © [Søren Brokær](http://srn.io)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

selectn-1.0.1.tar.gz (1.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page