Skip to content

simple function to preserve insensitive dictionary object

Notifications You must be signed in to change notification settings

sodrooome/insensitive-dict

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Insensitive Dict

Build Status

Simple case for insensitive dictionary object, All previous keys that already stored in dictionary can't be adding again (avoid duplication) and all keys will preserved as lowercase regardless previously was set in uppercase or capitalize object.

Example

# simple usage
>> from utils import InsensitiveDict

>> headers = InsensitiveDict({"Content-Type": "application/json"})
>> headers["content-type"]
application/json # expected output

Testing

Just run with execute following command python test_utils.py

Acknowledgments

This repository was created just to learn how to create an ordered dictionary object without using dict module that already provided by Python. You might be found some interesting in here :

About

simple function to preserve insensitive dictionary object

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages