Skip to main content

Are you tired of those pesky KeyError exceptions popping up in your programs? Do you need certain keys planted in your dictionaries? Do you just want to get away with it all?

Inspired by Manitowoc County Sheriff’s Lieutenant James Lenk, Lenk is a dictionary-like class that plants values for any key you want to look for. It comes with one key planted by default.

Installation

pip install lenk

Usage

You use Lenk just like any other dictionary.

>>> from lenk import Lenk
>>> evidence = Lenk()
>>> evidence["Toyota Rav4"]
True
>>> evidence["something else"]
'k16uxjcu9wglu25v2kl0'

See? It found that Toyota Rav4 key no problem! It also finds any other key you’d want to look for.

About

Manitowoc County Sheriff’s Lieutenant James Lenk is a bad person.

http://i.imgur.com/EHCNSYV.jpg

Release files for lenk 1.1

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

Source distribution (sdist)

Source distribution for lenk 1.1
File Size Uploaded
lenk-1.1.tar.gz 1.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lenk 1.1
File Interpreter ABI Platform
lenk-1.1-py2-none-any.whl Python 2 none any Details

Total release size: 5.4 kB

Release files / lenk-1.1.tar.gz

Download URL lenk-1.1.tar.gz
Size 1.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ff1da2caf2077b7736d9646647e2e4bcdcc7e3e06f6b9fbaa9bc4b755740ef25
BLAKE2b-256 checksum
How to use checksums
37726412ffd73c943b77eb579418f8c82b28f76aeccbbc5be4503a66ac6f2edc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / lenk-1.1-py2-none-any.whl

Download URL lenk-1.1-py2-none-any.whl
Size 3.4 kB
Tags Python 2
SHA-256 checksum
How to use checksums
19a88cfae0146db61a22f2eb3719bab424990f54988e4e76827300f4fccb7fa6
BLAKE2b-256 checksum
How to use checksums
f06bfa89d3d6b56ee3a63b14c66bb4852b20939474b9912a9af91cc64d98ad54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.1 This release

2 release files

1.0

2 release files

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