Skip to main content

Handle settings with default in python

Project description

Handle settings files in python. Serialize to JSON.


import defaultsettings

# Create new settings template
settings = defaultsettings.Settings()

# Set default values
Settings.default("key", "one")
settings.default("key2", range(5))

# Save settings to file"pathname.json")

# Load settings

# Current settings, default and loaded config

# Change data["key"] = "two"

# Save config file with new data"pathname.json")

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 defaultsettings, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size defaultsettings-0.0.3.tar.gz (2.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page