dhapi


Namedhapi JSON
Version 4.0.4 PyPI version JSON
download
home_pagehttps://github.com/roeniss/dhlottery-api
Summary동행복권 비공식 API
upload_time2024-07-25 16:52:31
maintainerNone
docs_urlNone
authorRoeniss Moon
requires_python<4,>=3.8
licenseNone
keywords donghaeng lottery lotto645 api korean
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 비공식 동행복권 API

[![PyPI version](https://badge.fury.io/py/dhapi.svg)](https://badge.fury.io/py/dhapi)

[동행복권](https://dhlottery.co.kr/) 사이트를 터미널에서 이용할 수 있게 랩핑한 API입니다.

### 설치 밎 사용법

```sh
pip install dhapi --upgrade # pip 최신 버전을 권장합니다: pip install --upgrade pip
dhapi --help # 기본 도움말 보기 
dhapi buy-lotto645 --help # '로또6/45' 구매 명령어의 도움말 보기
dhapi buy-lotto645 -y # '로또6/45' 자동모드로 5장 구매 & 확인절차 스킵
```

## 구현된 기능들

- [로또6/45 구매](https://dhlottery.co.kr/gameInfo.do?method=gameMethod&wiselog=H_B_1_1) (`buy-lotto645`)
    - 자동, 수동, 반자동 모드로 구매 가능합니다.
    - 한 번에 최대 5장까지 구매 가능합니다.
    - 매주 최대 5장까지 구매 가능합니다 (동행복권 측의 온라인 구매 관련 정책입니다).
- [예치금 현황 조회](https://dhlottery.co.kr/userSsl.do?method=myPage) (`show-balance`)
    - 현재 보유한 예치금 정보를 조회합니다.
- [고정 가상계좌 입금을 위한 세팅](https://dhlottery.co.kr/userSsl.do?method=myPage) (`assign-virtual-account`)
    - 개인에게 할당된 가상계좌에 입금하는 형태로 예치금을 충전할 수 있습니다. 이 때 얼마를 입금할건지 사이트에서 미리 선택해두어야 하는데, 이 작업을 대신 수행합니다.
    - 입금은 직접 진행해야 합니다.
    - 간편 충전 기능은 구현되지 않았습니다.

### 유틸성 기능들

- 복수 프로필 지정
    - 두 개 이상의 프로필을 사용할 수 있습니다. 고급 설정 섹션을 참고해주세요.

## 고급 설정

### 프로필 (계정) 설정

> [!NOTE] 최초 프로그램을 실행할 때 프로필 정보를 세팅하는 과정이 진행됩니다. 이 섹션에선 직접 프로필 정보 파일을 수정하는 법을 안내합니다.

`~/.dhapi/credentials` 파일을 사용해 프로필 정보를 수정하거나 여러 계정을 설정할 수 있습니다. toml 포맷을 사용하고 있으며, 아래와 같은 형식으로 작성할 수 있습니다.

```toml
[default]
username = "dhlotter_id"
password = "dhlotter_pw"
[another_profile]
username = "dhlotter_second_id"
password = "dhlotter_second_pw"
```

이후 `-p` 플래그로 프로필을 골라 사용합니다.

## 기부하기

이 프로그램을 사용해서 1등에 당첨된다면, 저에게 꼭 1000만원을 기부해주시길 바랍니다.

그리고 딱히 당첨된 적은 없지만 그래도 커피를 사주고 싶다면, 절대 망설이지 마십시오.

[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/yellow_img.png)](https://www.buymeacoffee.com/roeniss)

## 기여하기

기여는 대환영입니다! [CONTRIBUTING.md](/docs/CONTRIBUTING.md) 파일을 참고해주세요.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/roeniss/dhlottery-api",
    "name": "dhapi",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.8",
    "maintainer_email": null,
    "keywords": "donghaeng, lottery, lotto645, api, korean",
    "author": "Roeniss Moon",
    "author_email": "roeniss2@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/c4/8b/f1558edbd9e42b9dbe7f7d1ec2ce75e4e136c043d5d9dba181e70f3184bd/dhapi-4.0.4.tar.gz",
    "platform": null,
    "description": "# \ube44\uacf5\uc2dd \ub3d9\ud589\ubcf5\uad8c API\n\n[![PyPI version](https://badge.fury.io/py/dhapi.svg)](https://badge.fury.io/py/dhapi)\n\n[\ub3d9\ud589\ubcf5\uad8c](https://dhlottery.co.kr/) \uc0ac\uc774\ud2b8\ub97c \ud130\ubbf8\ub110\uc5d0\uc11c \uc774\uc6a9\ud560 \uc218 \uc788\uac8c \ub7a9\ud551\ud55c API\uc785\ub2c8\ub2e4.\n\n### \uc124\uce58 \ubc0e \uc0ac\uc6a9\ubc95\n\n```sh\npip install dhapi --upgrade # pip \ucd5c\uc2e0 \ubc84\uc804\uc744 \uad8c\uc7a5\ud569\ub2c8\ub2e4: pip install --upgrade pip\ndhapi --help # \uae30\ubcf8 \ub3c4\uc6c0\ub9d0 \ubcf4\uae30 \ndhapi buy-lotto645 --help # '\ub85c\ub6106/45' \uad6c\ub9e4 \uba85\ub839\uc5b4\uc758 \ub3c4\uc6c0\ub9d0 \ubcf4\uae30\ndhapi buy-lotto645 -y # '\ub85c\ub6106/45' \uc790\ub3d9\ubaa8\ub4dc\ub85c 5\uc7a5 \uad6c\ub9e4 & \ud655\uc778\uc808\ucc28 \uc2a4\ud0b5\n```\n\n## \uad6c\ud604\ub41c \uae30\ub2a5\ub4e4\n\n- [\ub85c\ub6106/45 \uad6c\ub9e4](https://dhlottery.co.kr/gameInfo.do?method=gameMethod&wiselog=H_B_1_1) (`buy-lotto645`)\n    - \uc790\ub3d9, \uc218\ub3d9, \ubc18\uc790\ub3d9 \ubaa8\ub4dc\ub85c \uad6c\ub9e4 \uac00\ub2a5\ud569\ub2c8\ub2e4.\n    - \ud55c \ubc88\uc5d0 \ucd5c\ub300 5\uc7a5\uae4c\uc9c0 \uad6c\ub9e4 \uac00\ub2a5\ud569\ub2c8\ub2e4.\n    - \ub9e4\uc8fc \ucd5c\ub300 5\uc7a5\uae4c\uc9c0 \uad6c\ub9e4 \uac00\ub2a5\ud569\ub2c8\ub2e4 (\ub3d9\ud589\ubcf5\uad8c \uce21\uc758 \uc628\ub77c\uc778 \uad6c\ub9e4 \uad00\ub828 \uc815\ucc45\uc785\ub2c8\ub2e4).\n- [\uc608\uce58\uae08 \ud604\ud669 \uc870\ud68c](https://dhlottery.co.kr/userSsl.do?method=myPage) (`show-balance`)\n    - \ud604\uc7ac \ubcf4\uc720\ud55c \uc608\uce58\uae08 \uc815\ubcf4\ub97c \uc870\ud68c\ud569\ub2c8\ub2e4.\n- [\uace0\uc815 \uac00\uc0c1\uacc4\uc88c \uc785\uae08\uc744 \uc704\ud55c \uc138\ud305](https://dhlottery.co.kr/userSsl.do?method=myPage) (`assign-virtual-account`)\n    - \uac1c\uc778\uc5d0\uac8c \ud560\ub2f9\ub41c \uac00\uc0c1\uacc4\uc88c\uc5d0 \uc785\uae08\ud558\ub294 \ud615\ud0dc\ub85c \uc608\uce58\uae08\uc744 \ucda9\uc804\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774 \ub54c \uc5bc\ub9c8\ub97c \uc785\uae08\ud560\uac74\uc9c0 \uc0ac\uc774\ud2b8\uc5d0\uc11c \ubbf8\ub9ac \uc120\ud0dd\ud574\ub450\uc5b4\uc57c \ud558\ub294\ub370, \uc774 \uc791\uc5c5\uc744 \ub300\uc2e0 \uc218\ud589\ud569\ub2c8\ub2e4.\n    - \uc785\uae08\uc740 \uc9c1\uc811 \uc9c4\ud589\ud574\uc57c \ud569\ub2c8\ub2e4.\n    - \uac04\ud3b8 \ucda9\uc804 \uae30\ub2a5\uc740 \uad6c\ud604\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4.\n\n### \uc720\ud2f8\uc131 \uae30\ub2a5\ub4e4\n\n- \ubcf5\uc218 \ud504\ub85c\ud544 \uc9c0\uc815\n    - \ub450 \uac1c \uc774\uc0c1\uc758 \ud504\ub85c\ud544\uc744 \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uace0\uae09 \uc124\uc815 \uc139\uc158\uc744 \ucc38\uace0\ud574\uc8fc\uc138\uc694.\n\n## \uace0\uae09 \uc124\uc815\n\n### \ud504\ub85c\ud544 (\uacc4\uc815) \uc124\uc815\n\n> [!NOTE] \ucd5c\ucd08 \ud504\ub85c\uadf8\ub7a8\uc744 \uc2e4\ud589\ud560 \ub54c \ud504\ub85c\ud544 \uc815\ubcf4\ub97c \uc138\ud305\ud558\ub294 \uacfc\uc815\uc774 \uc9c4\ud589\ub429\ub2c8\ub2e4. \uc774 \uc139\uc158\uc5d0\uc120 \uc9c1\uc811 \ud504\ub85c\ud544 \uc815\ubcf4 \ud30c\uc77c\uc744 \uc218\uc815\ud558\ub294 \ubc95\uc744 \uc548\ub0b4\ud569\ub2c8\ub2e4.\n\n`~/.dhapi/credentials` \ud30c\uc77c\uc744 \uc0ac\uc6a9\ud574 \ud504\ub85c\ud544 \uc815\ubcf4\ub97c \uc218\uc815\ud558\uac70\ub098 \uc5ec\ub7ec \uacc4\uc815\uc744 \uc124\uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. toml \ud3ec\ub9f7\uc744 \uc0ac\uc6a9\ud558\uace0 \uc788\uc73c\uba70, \uc544\ub798\uc640 \uac19\uc740 \ud615\uc2dd\uc73c\ub85c \uc791\uc131\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\n```toml\n[default]\nusername = \"dhlotter_id\"\npassword = \"dhlotter_pw\"\n[another_profile]\nusername = \"dhlotter_second_id\"\npassword = \"dhlotter_second_pw\"\n```\n\n\uc774\ud6c4 `-p` \ud50c\ub798\uadf8\ub85c \ud504\ub85c\ud544\uc744 \uace8\ub77c \uc0ac\uc6a9\ud569\ub2c8\ub2e4.\n\n## \uae30\ubd80\ud558\uae30\n\n\uc774 \ud504\ub85c\uadf8\ub7a8\uc744 \uc0ac\uc6a9\ud574\uc11c 1\ub4f1\uc5d0 \ub2f9\ucca8\ub41c\ub2e4\uba74, \uc800\uc5d0\uac8c \uaf2d 1000\ub9cc\uc6d0\uc744 \uae30\ubd80\ud574\uc8fc\uc2dc\uae38 \ubc14\ub78d\ub2c8\ub2e4.\n\n\uadf8\ub9ac\uace0 \ub531\ud788 \ub2f9\ucca8\ub41c \uc801\uc740 \uc5c6\uc9c0\ub9cc \uadf8\ub798\ub3c4 \ucee4\ud53c\ub97c \uc0ac\uc8fc\uace0 \uc2f6\ub2e4\uba74, \uc808\ub300 \ub9dd\uc124\uc774\uc9c0 \ub9c8\uc2ed\uc2dc\uc624.\n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/yellow_img.png)](https://www.buymeacoffee.com/roeniss)\n\n## \uae30\uc5ec\ud558\uae30\n\n\uae30\uc5ec\ub294 \ub300\ud658\uc601\uc785\ub2c8\ub2e4! [CONTRIBUTING.md](/docs/CONTRIBUTING.md) \ud30c\uc77c\uc744 \ucc38\uace0\ud574\uc8fc\uc138\uc694.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "\ub3d9\ud589\ubcf5\uad8c \ube44\uacf5\uc2dd API",
    "version": "4.0.4",
    "project_urls": {
        "Bug Reports": "https://github.com/roeniss/dhlottery-api/issues",
        "Homepage": "https://github.com/roeniss/dhlottery-api",
        "Source": "https://github.com/roeniss/dhlottery-api/"
    },
    "split_keywords": [
        "donghaeng",
        " lottery",
        " lotto645",
        " api",
        " korean"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f44c264c0f6e875f1cd8418e05785850bbace1eba46199114d14ed376951cfea",
                "md5": "5a98195656e9e0c2d688393905aa1c46",
                "sha256": "8b6c821336733c2727367792ea6e5b6a70af732a275f750d3be09aa963ad9db8"
            },
            "downloads": -1,
            "filename": "dhapi-4.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5a98195656e9e0c2d688393905aa1c46",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.8",
            "size": 20581,
            "upload_time": "2024-07-25T16:52:29",
            "upload_time_iso_8601": "2024-07-25T16:52:29.916712Z",
            "url": "https://files.pythonhosted.org/packages/f4/4c/264c0f6e875f1cd8418e05785850bbace1eba46199114d14ed376951cfea/dhapi-4.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c48bf1558edbd9e42b9dbe7f7d1ec2ce75e4e136c043d5d9dba181e70f3184bd",
                "md5": "c66b8c61a7c11a08dc5bd446eb592741",
                "sha256": "c968f57b0a0724333ef424206fe19b9f1143684a936a582c2ab8935b41920170"
            },
            "downloads": -1,
            "filename": "dhapi-4.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "c66b8c61a7c11a08dc5bd446eb592741",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.8",
            "size": 18309,
            "upload_time": "2024-07-25T16:52:31",
            "upload_time_iso_8601": "2024-07-25T16:52:31.302389Z",
            "url": "https://files.pythonhosted.org/packages/c4/8b/f1558edbd9e42b9dbe7f7d1ec2ce75e4e136c043d5d9dba181e70f3184bd/dhapi-4.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-25 16:52:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "roeniss",
    "github_project": "dhlottery-api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "dhapi"
}
        
Elapsed time: 2.03330s