A library of featureful collection objects providing path-like keys
Project description
ariadna
A featureful map object that can take path-like keys to access nested keys or attributes.
Examples
from ariadna import Caja
configuration = Caja({
'clients' : [
{
'name' : 'Joe',
'lastname' : 'Doe',
'addresses' : [
{
'street' : '1st Mulholland Drive',
'city' : 'Redmond',
'state' : 'Washington',
'zip' : '12345'
},
{
'street' : '15101 Linea Drive',
'city' : 'Miami',
'state' : 'Florida',
'zip' : '67890'
}
],
'phone' : [
'1-555-888-8888',
'1-404-NOT-REAL'
],
'age': '42'
}
]
})
# now the values can be accessed using
print(configuration['clients.0.addresses.1.city']) # == Miami
print(configuration['clients/0/phone/1']) # == 1-404-NOT-REAL
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
ariadna-0.0.1b0.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for ariadna-0.0.1b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7936139faffb4a73f9fde6014f52335cc59547530ef88a60c470ac88a82b6cf6 |
|
MD5 | c201e6b481ff29f9c08618de68a8c4df |
|
BLAKE2b-256 | 59ed3d5bbb6544d84fa54ec79c8b5a0660a247cfb6b223a4a16955d244d235fd |