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
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
Free software: WTFPL
Documentation: https://chibi-atlas.readthedocs.io.
History
0.0.1 (2024-02-06)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for chibi_atlas-1.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5919195635eb78f568a569ab4cae9f1f0de6bb039e1aed775434d821d6e45394 |
|
MD5 | 43e0b623b77a88fad84891ffe9699856 |
|
BLAKE2b-256 | 228d6e97e70ac976bb2d0b936cbc7a518a11b24b9adbd825bd103579a23c3edd |