semvec/pypi-packages huggingface dataset:
ipathelper 1.0.5
PythonでIPATに投票する際に利用可能なモジュール
Requires Python: >=3.12

=====================
ipathelper
=====================

--------
概要
--------

`Github <https://github.com/Mikimini9627/ipathelper_dll>`__ ではPython以外の利用例を公開しています。  
関数仕様については `関数仕様書 <https://github.com/Mikimini9627/ipathelper_dll/blob/main/builds/%E9%96%A2%E6%95%B0%E4%BB%95%E6%A7%98%E6%9B%B8.md>`__ を確認してください。

--------
使用方法
--------

.. code-block:: 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()

----------------
インストール方法
----------------

.. code-block:: console

    $ pip install ipathelper
educelab-hercdb 0.1.1
Graph database API for Herculaneum data
Requires Python: >=3.10

# EduceLab Herculaneum Graph Database API

This API is considered a work in progress and can change at any moment.

## Installation

The latest release is available on PyPI:

```shell
python3 -m pip install educelab-hercdb
```

## Connect to a server

```python
from educelab import hercdb

uri = "neo4j://localhost:7687"
user = "foo"
password = "bar"
db = hercdb.connect(uri, user, password)
if db.verify_connection():
  print("Connected!")
```

### Server configuration

If not provided when calling `hercdb.connect()`, this package will attempt to 
read the URI, username, and password from the configuration file at `~/.hercdb`. 
This file is expected to be in the [TOML](https://toml.io/) format:
```toml
[database]
uri = "neo4j://localhost:7687"
username = "foo"
password = "bar"
```
The section header is optional, and only the information from the first section 
will be read. In the future, sections may be used to differentiate multiple 
database servers. **Note: In Python 3.10, the configuration file is loaded 
using `configparser`, which does not support the full TOML syntax.**

Alternatively, the server information can be provided by exporting the following 
environment variables:
```shell
export EDUCEDB_URI='neo4j://localhost:7687'
export EDUCEDB_USER=foo
export EDUCEDB_PASSWORD=bar
```
Environment variables take priority over the configuration file. 

As a convenience, this package provides the `hercdb.config.request_required()`
method, which will check for configuration values in the environment and 
the configuration file and prompt for any which have not been provided:
```
>>> hercdb.config.request_required()

Enter URI: neo4j://localhost:7687
Enter username: foo
Enter password: 
```