Skip to main content

비공식 동행복권 API

PyPI version

동행복권 사이트를 터미널에서 이용할 수 있게 랩핑한 API입니다.

https://github.com/user-attachments/assets/0be65454-8025-4fff-aa29-f88bc5948b43

설치 밎 사용법

Python 3.9 이상이 필요합니다.

pip install dhapi --upgrade # pip 최신 버전을 권장합니다: pip install --upgrade pip
# [uv](https://github.com/astral-sh/uv) 사용 시
uv pip install dhapi --upgrade
dhapi --help # 기본 도움말 보기
dhapi buy-lotto645 --help # '로또6/45' 구매 명령어의 도움말 보기
dhapi buy-lotto645 -y # '로또6/45' 자동모드로 5장 구매 & 확인절차 스킵

설치 없이 사용하기

uvx dhapi --help
uvx dhapi buy-lotto645 --help
uvx dhapi buy-lotto645 -y

구현된 기능들

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

유틸성 기능들

  • 복수 프로필 지정
    • 두 개 이상의 프로필을 사용할 수 있습니다. 고급 설정 섹션을 참고해주세요.
  • 프로필 목록 조회 (show-profiles)
    • 설정된 프로필 이름들을 확인할 수 있습니다.

고급 설정

프로필 (계정) 설정

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

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

[default]
username = "dhlotter_id"
password = "****"
[another_profile]
username = "dhlotter_second_id"
password = "****"

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

기부하기

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

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

"Buy Me A Coffee"

기여하기

기여는 대환영입니다! CONTRIBUTING.md 파일을 참고해주세요.

Metadata

Release files for dhapi 4.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dhapi 4.2.4
File Size Uploaded
dhapi-4.2.4.tar.gz 28.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dhapi 4.2.4
File Interpreter ABI Platform
dhapi-4.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 53.4 kB

Release files / dhapi-4.2.4.tar.gz

Download URL dhapi-4.2.4.tar.gz
Size 28.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c807d40960c99677d5435ac3f0b8a0f6ac3ac6385f5404f712e74d1bef0e3b7c
BLAKE2b-256 checksum
How to use checksums
f96de1af1fbbaf7167353ac14466ce87bfa4337c5c441b5793c4094ce6f655b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 10, 2026.

Transparency log

Release files / dhapi-4.2.4-py3-none-any.whl

Download URL dhapi-4.2.4-py3-none-any.whl
Size 24.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2eb31def9d6f084dc5663f428633cc8af9fbdd1bbbd38381c48133d59222605d
BLAKE2b-256 checksum
How to use checksums
dcdfaf32e49ace1c714ed20c35b4ccc39945d7f65697282716b1ff96f3845fa2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 10, 2026.

Transparency log

Release history Release notifications | RSS feed

5.0.0

2 release files

This release

4.2.4 This release

2 release files

4.2.3

2 release files

4.2.2

2 release files

4.2.1

2 release files

4.2.0

2 release files

4.1.5

2 release files

4.0.6

2 release files

4.0.5

2 release files

4.0.4

2 release files

4.0.3

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.3.0

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.0

2 release files

1.4.0

2 release files

1.3.5

2 release files

1.3.4

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.13

2 release files

1.0.12

2 release files

1.0.11

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page