Skip to main content
`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.

Metadata

Release files for addressable 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for addressable 1.0.2
File Size Uploaded Provenance Actions
addressable-1.0.2.tar.gz 2.6 kB Without provenance Details for addressable-1.0.2.tar.gz

Release files / addressable-1.0.2.tar.gz

Download URL addressable-1.0.2.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b50690a313fa5df946a34227e50b5276ee047be19e2a9451d7eb09d11d01d0a1
BLAKE2b-256 checksum
How to use checksums
5461fd20bbc999b0d141ffe573037cc1de7deb6836d4cf702f84a9b5d5d62a21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for addressable 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page