Skip to main content

dict replacement

Project description

https://img.shields.io/pypi/v/dict.svg https://img.shields.io/pypi/pyversions/dict.svg https://img.shields.io/pypi/dm/dict.svg

Install

github.com: pip install git+git://github.com/russianidiot/dict.py.git

pypi.python.org: pip install dict

download: [ -e requirements.txt ] && pip install -r requirements.txt; python setup.py install

Features

  • attribute-style access

  • None instead of KeyError

  • safe remove

  • jQuery like methods chaining

Usage

from dict import *

>>> dict(k="v")["k"]
"v"

>>>  dict(k="v").k
"v"

>>> dict(k="v")["not_existing"]
None

>>> dict(k="v").not_existing
None

>>> dict(k="v").get("K",i=True) # case insensitive
"v"

dict(k="v").remove("k").update(k2="v2") # jquery like chain

Feedback

github_issues - Github Issues

gitter - Chat with me (english/russian)

russianidiot.github.io/python/ - my Python packages

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

dict-0.0.4.tar.gz (5.1 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