Skip to main content

동행복권 비공식 API

Project description

비공식 동행복권 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 파일을 참고해주세요.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dhapi-4.2.4.tar.gz (28.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dhapi-4.2.4-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

Details for the file dhapi-4.2.4.tar.gz.

File metadata

  • Download URL: dhapi-4.2.4.tar.gz
  • Upload date:
  • Size: 28.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dhapi-4.2.4.tar.gz
Algorithm Hash digest
SHA256 c807d40960c99677d5435ac3f0b8a0f6ac3ac6385f5404f712e74d1bef0e3b7c
MD5 ecaabf708baadb739a5c231dc776b462
BLAKE2b-256 f96de1af1fbbaf7167353ac14466ce87bfa4337c5c441b5793c4094ce6f655b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhapi-4.2.4.tar.gz:

Publisher: build-publish-release-note.yml on roeniss/dhlottery-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dhapi-4.2.4-py3-none-any.whl.

File metadata

  • Download URL: dhapi-4.2.4-py3-none-any.whl
  • Upload date:
  • Size: 24.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dhapi-4.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2eb31def9d6f084dc5663f428633cc8af9fbdd1bbbd38381c48133d59222605d
MD5 aecd4efb05d6bf063723bba41f53126d
BLAKE2b-256 dcdfaf32e49ace1c714ed20c35b4ccc39945d7f65697282716b1ff96f3845fa2

See more details on using hashes here.

Provenance

The following attestation bundles were made for dhapi-4.2.4-py3-none-any.whl:

Publisher: build-publish-release-note.yml on roeniss/dhlottery-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page