All Projects → DongjunLee → hb-config

DongjunLee / hb-config

Licence: MIT license
hb-config: easy to configure your python project especially Deep Learning experiments

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to hb-config

dotfiles
My NixOS configuration featuring awesome and neovim
Stars: ✭ 40 (+90.48%)
Mutual labels:  config
juno-agent
juno-agent
Stars: ✭ 46 (+119.05%)
Mutual labels:  config
nim config
Global project-agnostic config.nims
Stars: ✭ 54 (+157.14%)
Mutual labels:  config
ini
📝 Go INI config management. support multi file load, data override merge. parse ENV variable, parse variable reference. Dotenv file parse and loader. INI配置读取管理,支持多文件加载,数据覆盖合并, 解析ENV变量, 解析变量引用。DotEnv 解析加载
Stars: ✭ 72 (+242.86%)
Mutual labels:  config
dotfiles
/home/yous
Stars: ✭ 43 (+104.76%)
Mutual labels:  config
DazzleConf
Incredible configuration library
Stars: ✭ 34 (+61.9%)
Mutual labels:  config
Vscode Data Preview
Data Preview 🈸 extension for importing 📤 viewing 🔎 slicing 🔪 dicing 🎲 charting 📊 & exporting 📥 large JSON array/config, YAML, Apache Arrow, Avro, Parquet & Excel data files
Stars: ✭ 245 (+1066.67%)
Mutual labels:  config
profig
A straightforward configuration library for Python.
Stars: ✭ 26 (+23.81%)
Mutual labels:  config
Webpack5-Max
Webpack 5 Boilerplate for JS/React/TS apps.
Stars: ✭ 103 (+390.48%)
Mutual labels:  config
dotfiles
My collection of dotfiles
Stars: ✭ 77 (+266.67%)
Mutual labels:  config
dotfiles
My personal set of dotfiles (Managed with Stow)
Stars: ✭ 34 (+61.9%)
Mutual labels:  config
nvim
No description or website provided.
Stars: ✭ 13 (-38.1%)
Mutual labels:  config
DI-compiler
A Custom Transformer for Typescript that enables compile-time Dependency Injection
Stars: ✭ 62 (+195.24%)
Mutual labels:  singleton
config utilities
Utility tools to make working with config structs for (ROS) C++ libraries more uniform, readable and convenient.
Stars: ✭ 19 (-9.52%)
Mutual labels:  config
dotfiles
The config that makes me a productivity whiz 🧙‍♂️
Stars: ✭ 36 (+71.43%)
Mutual labels:  config
Yay Evil Emacs
😈 A lightweight literate Emacs config with even better "better defaults". Shipped with a custom theme!
Stars: ✭ 250 (+1090.48%)
Mutual labels:  config
data examples
An example app showing different ways to pass to and share data with widgets and pages.
Stars: ✭ 56 (+166.67%)
Mutual labels:  singleton
nodegame-server
nodeGame server for the browser and node.js
Stars: ✭ 17 (-19.05%)
Mutual labels:  experiment
design-pattern
🌴 Detail design pattern and give many demos in Java.
Stars: ✭ 28 (+33.33%)
Mutual labels:  singleton
rimerc
rimerc: rimer's dictionary & config
Stars: ✭ 228 (+985.71%)
Mutual labels:  config

Project Introduction PyPI version
build status Requirements Status Dependency Status
Codecov

hb-config: easy to configure your python packge

hb-config is utility for easy to configure your python project especially Deep Learning experiments.

Feature

  • Do not use any boilerplate code
  • Singleton Class (immediately use anywhere)
  • Supports formats: .json and .yaml
  • Access property using __getattr__ function Config.TOKEN
  • Edit property using __setattr__ function Config.TOKEN = "{token}"
  • every config data's type is dict

Install

using pip

$ pip install hb-config

or clone repository

git clone https://github.com/hb-research/hb-config.git
python setup.py install

Usage

  • base path : config/
  • config3.yml example
project: hb-config
example: true
bot:
  in_bot:
    test: haha
    simple: wow
  • Using like dict
    • only one difference : Config["project"] -> Config.project
    • using get Config.get("project"), Config.get("project", {})
    • using set Config.project = "set value"
  • Add description with python annotation. #

Load config

>>> from hbconfig import Config
>>> Config("config3")
>>> Config
Read config file name: config3.yml
{
    "project": "hb-config",
    "example": true,
    "bot": {
        "in_bot": {
            "test": "haha",
            "simple": "wow"
        }
    }
}

Get

>>> Config.bot.in_bot
{
    "test": "haha"
    "simple": "wow"
}

>>> Config.project
'hb-config'

>>> Config.bot.in_bot.get("simple")
'wow'

>>> Config.bot.in_bot.get("not_exist_key", "default_value")
'default_value'

Set

  • The config file does not change.
>>> Config.bot.in_bot
{
    "test": "haha"
    "simple": "wow"
}

>>> Config.bot.in_bot = "hello"
>>> Config.bot.in_bot
'hello'

Description

  • example config
project: hb-config    # project name
example: true         # is it example?
bot:
  in_bot:
    test: haha
    simple: wow
>>> Config
Read config file name: ./config/config
{
    "project": "hb-config",
    "example": true,
    "bot": {
        "in_bot": {
            "test": "haha",
            "simple": "wow"
        }
    }
}
>>> Config.description
{'example': 'is it example?', 'project': 'project name'}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].