Catalog PyPI
PACKAGE EXPLORERView in registry

addressable

PyPI

Use lists like you would dictionaries.

utility
Versions collected1
Direct dependencies0From release 1.4.2
Last observed20 Oct, 19:21 UTC

README

Version 1.4.2 documentation
``addressable`` is a silly little utility that allows you to access
items inside of a list using one or more indices as keys. You pretty
much get to pretend pretend that a list is a souped-up dictionary.

::

    artists = [{
        'id': '0488', 
        'name': 'Lambchop', 
        'members': ['Kurt Wagner'], 
    }, {
        'id': '9924', 
        'name': 'Dire Straits', 
        'members': ['Mark Knopfler'], 
    }]

    # keys are matched against one or more indices
    artists = List(artists, indices=('id', 'name'))
    print artists['0488'] == artists['Lambchop']

    # fuzzy matching
    artists = List(artists, indices=('id', 'title'), fuzzy=True)
    print artists['strait']

    # extract the value, not the metadata
    artists = List(artists, indices=('id', 'title'), facet='title')
    print artists['9924'] == 'Dire Straits'

So why would you want to do any of this? You probably don't.

``addressable`` can be useful for certain DSL or library code where you
want to give the end users some freedom to code things their way, when
you need to be able to very easily refer to certain things that are
weirdly named or when there's multiple common ways of referring to
something and you want the flexibility to mix-and-match.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.4.211 Mar 20150

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
debrouwere/python-addressable

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:21 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:1f615f75a46ce90794bebf9f97fc91b51e9faa2311f61e683034021d25df6d76