Skip to main content

small lib to proccess the keys of the dict like attributes

Project description

chibi_atlas

small lib to proccess the keys of the dict like attributes

https://img.shields.io/pypi/v/chibi_atlas.svg https://img.shields.io/travis/dem4ply/chibi_atlas.svg Documentation Status

this is a dict but his keys can be access like attribute

import chibi_atlas import Chibi_atlas


c = Chibi_atlas( { 'stuff': 'str', 'l': [ 1, { 'more_stuff': 'str_2' } ] } )
isintance( c, dict ) == true
c.stuff == 'str'
c.l[0] == 1
c.l[1].more_stuff == 'str_2'

chibi_atlas_multi

Chibi_atlas_multi se utiliza para asumir que cada asignacion en cada key seria asumiendo que su valor es una lista y se le hace append en el caso que solo se le asigne un solo valor entonces usara el comportamiento por defecto de los dicionarios

from chibi_atlas.multi import Chibi_atlas_multi

c = Chibi_atlas_multi()
c[ 'a' ] = 'a'
assert { 'a': 'a' } == c

c = Chibi_atlas_multi()
c[ 'a' ] = 'a'
c[ 'a' ] = 'b'
c[ 'a' ] = 'c'
assert { 'a': [ 'a', 'b', 'c', ] } == c

Chibi_tree

no recuerdo porque hice esta cosa pero funciona como un arbol con atributos

History

0.0.1 (2024-02-06)

  • First release on PyPI.

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

chibi_atlas-1.0.2.tar.gz (11.7 kB view hashes)

Uploaded Source

Built Distribution

chibi_atlas-1.0.2-py2.py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 2 Python 3

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