semvec/pypi-packages huggingface dataset:
hk-utils 1.1.7
Python utilities by Heekang Park
License: MIT
Requires Python: >=3

# hk_utils [PYTHON]

Python 유틸리티 패키지

by Heekang Park

## Requirements

- Python 3 이상

## Installation

```bash
pip install hk_utils
```

## Documentation

### hk_utils.print

```python
from hk_utils 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_utils.AttrDict

```python
from hk_utils import AttrDict

x = AttrDict.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
```

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

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

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

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

## Changelog

### v1.0

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

### v1.1

- `AttrDict` 모듈 추가
aprompt 3.0.1
Advanced Prompts
License: MIT
Requires Python: >=3.10
Keywords: form,input,prompt

aprompt - Advanced Prompt
=========================

Why use `input()` when you can go _advanced_?

*aprompt* lets you prompt users in a neat way. It comes with a UI system
and everything is customizable!

![Demonstration](https://raw.githubusercontent.com/phoenixr-codes/aprompt/main/docs/media/prompt-choice.gif)

[![Documentation Status](https://readthedocs.org/projects/aprompt/badge/?version=latest)](https://aprompt.readthedocs.io/en/latest/?badge=latest)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

Features
--------

* ✅ Large set of built-in prompts.
* ✅ Custom prompts
* ✅ Custom themes
* ✅ Drop-in replacement for
  [argparse](https://docs.python.org/3/library/argparse.html?highlight=argparse#module-argparse)
* ✅ Test API


Available Prompts
-----------------

While it is easily possible to create custom prompts, aprompt comes with
a lot of useful prompts.

* [x] Text
* [x] Integer
* [x] Confirmation
* [x] PIN Code
* [x] Sort
* [x] Choice
* [x] Multiple Choice
* [ ] Path
* [ ] Datetime
* [ ] Date
* [ ] Time

_Unchecked prompts are planned for the future_


Basic Usage
-----------

```python
from aprompt import prompt
from aprompt.prompts import choice

languages: list[str] = prompt(
    "In what languages can you code in?",
    choice(
        "c",
        "c++",
        "erlang",
        "fortran",
        "haskell",
        "javascript",
        "nim",
        "python",
        "ruby",
        "rust",
        "typescript",
        multiple=True
    )
)

# ... do something with `languages` ...
```

Test API
--------

*aprompt* provides the attribute `test_with` for the main prompt wrapper to
test the result for a predefined sequence of keys.

```python
def test_n() -> None:
    assert not prompt("", confirm(), test_with=iter("n\n"))
```


Links
-----

* [🐍 Repo](https://github.com/phoenixr-codes/aprompt)
* [📦 PyPI](https://pypi.org/project/aprompt)
* [📖 Docs](https://aprompt.readthedocs.io/)


ToDo
----

* add path prompt (as extension) and document it
* turn `match`es to `if-else`s
* add demo file and add a GIF of it to the README (instead of only the choice variant)
* add GIFs to all prompt engines docs
* turn simple formatter into a class
* add logo