Skip to main content

PythonでIPATに投票する際に利用可能なモジュール

Project description

概要

Github ではPython以外の利用例を公開しています。 関数仕様については 関数仕様書 を確認してください。

使用方法

from ipathelper import *

def main():

    try:
        # モジュールのイニシャライズ
        returnValue = init()
        if returnValue == False:
            return

        # ログイン処理(各自自分のIDに変えてください)
        returnValue = login('********', '********', '****', '****')
        if (returnValue & 1) != 1:
            print("ログインに失敗しました。")
            return

        # 馬券購入用のインスタンス取得
        betData = ST_BET_DATA()
        returnValue = get_bet_instance(KAISAI_NAKAYAMA, 11, 2020, 12, 27,
                        HOUSHIKI_FORMATION, SHIKIBETSU_TRIO, 100, "1,9-2,3,13-7,3,8,10", betData)
        if (returnValue & 1) != 1:
            print("馬券購入情報の取得に失敗しました。")
            return

        # 馬券購入処理実行
        betDataList = (ST_BET_DATA * 1)()
        betDataList[0] = betData
        returnValue = bet(betDataList, 1, 0)
        if (returnValue & 1) != 1:
            print("馬券購入に失敗しました。")
            return

        # 馬券購入用のインスタンス取得(WIN5)
        betDataWin5 = ST_BET_DATA_WIN5()
        returnValue = get_bet_instance_win5(100, 2020, 12, 27, "1,14-9,13-12-2-1,1,3,5", betDataWin5)
        if (returnValue & 1) != 1:
            print("馬券購入情報(WIN5)の取得に失敗しました。")
            return

        # 馬券購入処理実行(WIN5)
        returnValue = bet_win5(betDataWin5, 0)
        if (returnValue & 1) != 1:
            print("馬券購入(WIN5)に失敗しました。")
            return

    finally:

        # ログアウト処理
        logout()

        # モジュールのファイナライズ
        uninit()

if __name__ == '__main__':
    main()

インストール方法

$ pip install ipathelper

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

ipathelper-1.0.7.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

ipathelper-1.0.7-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file ipathelper-1.0.7.tar.gz.

File metadata

  • Download URL: ipathelper-1.0.7.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for ipathelper-1.0.7.tar.gz
Algorithm Hash digest
SHA256 cee709ef4a9ca6062067289d17c1e9d9fda2fc3d520f02a36491bbcfd895c395
MD5 269ba1b38ccc5a165b2014b438442ab6
BLAKE2b-256 061178eef5373063ca50db3988f74febda0376604ccac6b31b4bfc5f9c7fa77e

See more details on using hashes here.

File details

Details for the file ipathelper-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: ipathelper-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for ipathelper-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 6461068d97ffaa21244bdddd9992601aa9f20a78a20fb92e16fbfdd5fa03aeb8
MD5 8b8aebde94a21f2c79ac5f097e39fe88
BLAKE2b-256 464a79b05f4ac028185d349d9fc47de77d8f62cf3591c976d26774e171e48479

See more details on using hashes here.

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