Skip to main content

various handy utilities

Project description

intrand.py

Python utilities that are useful in their own little ways.

Installation

pip: pip install --upgrade intrand

Usage

import intrand

# some default values
defaults = {
	"preferences":{
		"color":"blue",
		"size":"medium",
		"gradient":True
	}
}

# some user input (perhaps via API)
userConfig = {
	"id":1234567890,
	"name":{
		"first":"John",
		"middle":"James",
		"last":"Smith"
	},
	"preferences":{
		"color":"gray"
	}
}

intrand.dict_utils.merge(defaults, userConfig)	# merge keys present in defaults,
												# but missing in userConfig
												# into userConfig

print(userConfig)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for intrand, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size intrand-0.0.5-py3-none-any.whl (3.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size intrand-0.0.5.tar.gz (2.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page