Skip to main content

addict ExtendeD

Project description

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.

AddDict

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)
update_dict(*args, **kwargs)

NoAttrDict

Works like AddDict, 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 = AddDict()
d2 = NoAttrDict()

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

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

News

0.0.9 (2017-05-01)

switch from pprint property to pprint() method, add pformat()

0.0.8 (2016-08-26)

add update_dict() for not recursive update()

0.0.6 (2015-08-06)

Flag to Beta.

0.0.4 (2015-08-06)

add __all__ list

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

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

addicted-0.0.9.tar.gz (6.0 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for addicted-0.0.9.tar.gz
Algorithm Hash digest
SHA256 23d68a061eca37cf1889be61defb63002931add0e5ff38fc22560250161640de
MD5 d9f7a490c3b56c57dea664a92e9f868d
BLAKE2b-256 b66d1549ea836e70139753a4b7957ec96d47f8c64b8f6e783f9ad9ba2743310b

See more details on using hashes here.

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