Metadata-Version: 2.1
Name: hk-libs
Version: 1.2.1
Summary: Python library by Heekang Park
Home-page: https://github.com/HeekangPark/hk_libs
Author: Heekang Park
Author-email: park.heekang33@gmail.com
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3
Description-Content-Type: text/markdown

# hk_libs [PYTHON]

간단한 python 라이브러리 모음

by Heekang Park

## Requirements

- Python 3 이상

## Installation

```bash
pip install hk_libs
```

## Documentation

### hk_libs.print

```python
from hk_libs import print

print("Hello World!")
print.success("Success!")
print.error("Error!")
print.warning("Warning!")
print.info("Info!")
print.debug("Debug!")
```

Make `print` colorful with `.success()`, `.error()`, `.warning()`, `.info()`, `.debug()` methods.

You can still use `print` as usual as well.

`print` 함수를 사용할 때, `.success()`, `.error()`, `.warning()`, `.info()`, `.debug()` 메소드를 사용하여 색상을 입힐 수 있습니다.

한편 여전히 일반적인 용도로 `print` 함수를 사용할 수도 있습니다.

### hk_libs.HKDict

```python
from hk_libs import HKDict

x = HKDict.from_dict({
    "a": 1,
    "b": 2,
    "c": {
        "d": 3,
        "e": 4,
    },
    "f": [
      1: {
        "g": 5,
        "h": 6,
      },
      10: {
        "i": 7,
        "j": 8,
      }
    ]
})

print(x.a) # 1
print(x["b"]) # 2
print(x.c.d) # 3
print(x.c["e"]) # 4
print(x.f[1].g) # 5
print(x.f[1]["h"]) # 6
print(x.f[10].i) # 7
print(x.f[10]["j"]) # 8
```

With `HKDict`, you can access dictionary keys with both dict-like syntax(ex. `x["a"]`) and object-like syntax(ex. `x.a`).

`HKDict` automatically convert nested dictionary as instance as well.

`HKDict`를 사용하면, `dict`와 유사한 문법(ex. `x["a"]`)과 객체와 유사한 문법(ex. `x.a`)을 모두 사용할 수 있습니다.

또한, 중첩된 `dict`도 자동으로 `HKDict` 인스턴스로 변환합니다.

## Changelog

### v1.0

- 최초 버전
- `hk_print` 모듈 추가

### v1.1

- `AttrDict` 모듈 추가

### v1.2

- package name 변경 : hk_utils -> hk_libs
- file name 변경 : AttrDict.py -> HKDict.py, hk_print.py -> HKPrint.py
- class name 변경 : AttrDict -> HKDict
- HKDict 기능 추가, 버그 수정
