semvec/pypi-packages huggingface dataset:
relativize-imports 0.0.6
Automatically convert python absolute imports to relative.
License: MIT
Requires Python: >=3.7

relativize-imports
================

[![badge](https://img.shields.io/pypi/v/relativize-imports)](https://pypi.org/project/relativize-imports/)

Automatically convert python absolute imports to relative.

Inspired and adapted from [MarcoGorelli/absolufy-imports](https://github.com/MarcoGorelli/absolufy-imports).

## Installation

```console
$ pip install --upgrade relativize-imports
```

## Usage as a pre-commit hook

See [pre-commit](https://github.com/pre-commit/pre-commit) for instructions

Sample `.pre-commit-config.yaml`:

```yaml
-   repo: https://github.com/reallyliri/relativize-imports
    rev: v0.0.6
    hooks:
    -   id: relativize-imports
```

Or with args:

```yaml
-   repo: https://github.com/reallyliri/relativize-imports
    rev: v0.0.6
    hooks:
    -   id: relativize-imports
        args:
          - svc/src
          - automation/tests/source
```

## Usage

```shell
relativize-imports [path/to/dir/or/file.py ...]
```

Provide zero or more paths to relativize.

Files are assumed to be relative to the cwd. Directories are assumed as relativization root and the tool will format all python files under them, in any depth.

If no args are provided, the tool will run in the cwd and address it as the relativization root.


## Config

The tool will read any config set in `tox.ini` in a root directory.

If you want to exclude any files from relativization (i.e entrypoints), you can add them to config:

```ini
[relativize-imports]
ignore = src/main.py,test
```

## Command-line example

```console
$ relativize-imports
$ relativize-imports src
$ relativize-imports mypackage/myfile.py
```

```diff
- from mypackage import __version__
+ from . import __version__
```

## Build and Publish

```shell
rm -rf dist
python setup.py bdist_wheel 
twine upload dist/*
```
kakao-json 1.0.2
카카오챗봇 JSON helper
License: MIT
Requires Python: >=3.10,<4.0

<div align="center">
<p>
    <img width="680" src="https://raw.githubusercontent.com/Alfex4936/kakaoChatbot-Ajou/main/imgs/chatbot.png">
</p>

<h2>카카오톡 챗봇 빌더 도우미</h2>
<h3>Python언어 전용</h3>
</div>

# 소개

Python 언어로 카카오 챗봇 서버를 만들 때 좀 더 쉽게 JSON 메시지 응답을 만들 수 있게 도와줍니다.

SimpleText, SimpleImage, ListCard, Carousel, BasicCard, CommerceCard, ItemCard 등의

챗봇 JSON 데이터를 쉽게 만들 수 있도록 도와줍니다.

# 설치
```bash
pip install kakao-json
```


# 사용법

## ListCard 예제

```python
from kakao_json import Button, Kakao, ListItem


k = Kakao()

    k.add_qr("오늘", "카톡 발화문1")
    k.add_qr("어제")  # label becomes also messageText

    list_card = k.init_list_card().set_header("리스트 카드 제목")
    list_card.add_button(Button("그냥 텍스트 버튼", "message"))
    list_card.add_button(k.init_button("link label").set_link("https://google.com"))
    list_card.add_button(
        k.init_button("share label").set_action_share().set_msg("카톡에 보이는 메시지")
    )
    list_card.add_button(k.init_button("call label").set_number("010-1234-5678"))

    list_card.add_item(
        ListItem("title").set_desc("description").set_link("https://naver.com")
    )

    k.add_output(list_card)

    print(k.to_json())

```

```json
{
  "template": {
    "outputs": [
      {
        "listCard": {
          "buttons": [
            {
              "label": "그냥 텍스트 버튼",
              "action": "message"
            },
            {
              "label": "link label",
              "action": "webLink",
              "webLinkUrl": "https://google.com"
            },
            {
              "label": "share label",
              "action": "share",
              "messageText": "카톡에 보이는 메시지"
            },
            {
              "label": "call label",
              "action": "phone",
              "phoneNumber": "010-1234-5678"
            }
          ],
          "header": {
            "title": "리스트 카드 제목!"
          },
          "items": [
            {
              "title": "title",
              "description": "description",
              "link": {
                "web": "https://naver.com"
              }
            }
          ]
        }
      }
    ],
    "quickReplies": [
      {
        "action": "message",
        "label": "오늘",
        "messageText": "오늘 공지 보여줘"
      },
      {
        "action": "message",
        "label": "어제",
        "messageText": "어제 공지 보여줘"
      }
    ]
  },
  "version": "2.0"
}
```