Skip to main content

addicted = addict ExtendeD

This library comes from ‘mewwts/addict‘ with some more features.

Dict

Same as Dict from ‘mewwts/addict‘ except that update() method accept list,tuple and kwargs like usual python dict The use of ‘inspect‘ module has been removed for performance reason.

DictExt

Dict with these additional methods

pprint()
find(pattern,**kwargs)
count_some_values(pattern,ignore_case=False)
count_some_keys(pattern,ignore_case=False)
count_some_items(filter)
iter_some_items(pattern,ignore_case=False)
iter_some_values(pattern,ignore_case=False)
iter_some_keys(pattern,ignore_case=False)
get_some_items(pattern,ignore_case=False)
get_some_values(pattern,ignore_case=False)
get_some_keys(pattern,ignore_case=False)
mget(*key_list)
extract(key_list)
parse_booleans(key_list)
parse_numbers(key_list)

NoAttrDict

Works like DictExt, except that it returns a ‘NoAttr‘ value when an attribute is missing. Please read noattr package notes for explaination about ‘NoAttr‘

from addicted import Dict,NoAttrDict
d1 = DictExt()
d2 = NoAttrDict()

print type(d1.a.b.c.d)
>>> <class 'addicted.DictExt'>

print type(d2.a.b.c.d)
>>> <class 'noattr.NoAttrType'>

News

0.0.3 (2015-08-04)

mewwts/addict source code has been included directly into elapouya/addicted to remove the use of ‘inspect’ module for performance reason the isgenerator() function has been coded another way. update() method has been changed to accept list,tuple and kwargs

0.0.2 (2015-07-31)

Add some methods

0.0.1 (2015-07-30)

First version

Download files

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

Source Distribution

addicted-0.0.3.tar.gz (5.6 kB view details)

Uploaded Source

File details

Details for the file addicted-0.0.3.tar.gz.

File metadata

  • Download URL: addicted-0.0.3.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for addicted-0.0.3.tar.gz
Algorithm Hash digest
SHA256 053a90efc03432549134fca992143312810c69535e8865c642c48c2f4db809cc
MD5 5f54c2225815940b85958a8e842f2e53
BLAKE2b-256 e97041c6a48bfb08d84cb1288b613867e3a2d366e2f1319348de2793dc31e027

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.9

1 file

0.0.8

1 file

0.0.5

1 file

0.0.4

1 file

This release

0.0.3 This release

1 file

0.0.2

1 file

0.0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page