Skip to main content

A simple config handler for python

Project description

Simple Config Handler

config_handler is a python module designed to manage loading and updating config files inside of a program. capable of a main config and a user config each simultaneously using json files, it makes it easy to locate configs for your programs every time.

How to find config files!

Config Storage Location in Windows

General Config File

C:/Users/$USER/APPDATA/Local/<your program name>/base-config.json

User Config

C:/Users/$USER/APPDATA/Local/<your program name>/user-config/<user>-config.json

Config Storage Location in Mac

General Config File

/Users/$USER/<your program name>/base-config.json

User Config

/Users/$USER/<your program name>/user-config/<user>-config.json

Config Storage Location in Linux

General Config File

/Users/$USER/.config/<your program name>/base-config.json

User Config

/Users/$USER/.config/<your program name>/user-config/<user>-config.json

Install instructions

Simple! Use Pypi!

pip3 install simple_config_manager

Usage

Simple!

import simple_config_handler
simple_config_handler.init("Program name")
main_config = simple_config_handler.load_base_config()
# get user info and name
user_data = simple_config_handler.load_user_config(user)

Project details


Download files

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

Source Distribution

simple_config_handler-0.0.1.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

simple_config_handler-0.0.1-py3-none-any.whl (2.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page