OBC Bugyo Cloud client
OBC 奉行クラウド Pythonクライアント
Usage
BugyoCloudClientのインスタンスを作成します。
import bugyocloudclient as bcc
tenant_code = 'The first part of URL path.'
client = bcc.BugyoCloudClient(tenant_code)
最初にLoginTaskを実行して、ログイン状態にします。
auth_info = bcc.AuthInfo('login id', 'password')
login_task = bcc.LoginTask(auth_info)
client.exec(login_task)
ログインしてから、別のタスクを実行します。 (今は打刻タスクしかありません)。
punch_info = bcc.PunchInfo()
punch_info.clock_type = clock_type
punch_task = bcc.PunchTask(punch_info)
client.exec(punch_task)
Installing poetry
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3
Changing python command name from 'python' to 'python3'.
vi ~/.poetry/bin/poetry
Creating environment
poetry install
Testing
poetry run pytest
Build & Publish
poetry buid
poetry publish -r testpypi
poetry publish
画面あるいはAPI
認証画面
- URL: https://id.obc.jp/{{テナント?}}/
- METHOD: GET
- Response:
- Headers:
- Content-Type: text/html; charset=utf-8
- Headers:
認証方法チェック
- URL: https://id.obc.jp/{{テナント?}}/login/CheckAuthenticationMethod
- METHOD: POST
- Headers:
- __RequestVerificationToken: 認証画面のフォームにあるhidden value
- Content-Type: application/x-www-form-urlencoded; charset=UTF-8
- X-Requested-With: XMLHttpRequest
- Content:
- "OBCiD" : ログインID
- "isBugyoCloud" : "false"
- Response:
- Headers:
- Content-Type: application/json; charset=utf-8
- Content:
- AuthenticationMethod
- SAMLButtonText
- PasswordButtonText
- Headers:
認証
- URL: https://id.obc.jp/{{テナント?}}/login/login/?Length=5
- METHOD: POST
- Headers:
- Content-Type: application/x-www-form-urlencoded; charset=UTF-8
- Content:
- "btnLogin" : ""
- "OBCID" : ログインID
- "Password_d1" : ""
- "Password_d2" : ""
- "Password_d3" : ""
- "Password" : パスワード
- "__RequestVerificationToken" : 認証画面のフォームにあるinput hidden value
- "X-Requested-With" : "XMLHttpRequest"
- Response:
- Headers:
- Content-Type: application/json; charset=utf-8
- Content:
- RedirectURL
- LoginOBCiD
- Headers:
レスポンスにあるRedirectURLをGETすると302が返ります。 302に従うと、ユーザ初期画面へ遷移します。URLは、https://hromssp.obc.jp/{{テナント?}}/{{ユニーク文字列?}}/ のようになります。
ユーザ初期画面
- URL: https://hromssp.obc.jp/{{テナント?}}/{{ユニーク文字列?}}/
- METHOD: GET
認証後の302応答に従うとたどり着きます。
ユニーク文字列の部分を、このあとの処理で使います。
打刻画面
- URL: https://hromssp.obc.jp/{{テナント?}}/{{ユーザ初期画面URLより}}/timeclock/punchmark/
- METHOD: GET
- Response:
- Headers:
- Content-Type: text/html; charset=utf-8
- Headers:
打刻
- URL: https://hromssp.obc.jp/{{テナント?}}/{{ユーザ初期画面URLより}}/TimeClock/InsertReadDateTime/
- METHOD: POST
- Headers:
- "__RequestVerificationToken": 打刻画面にあるinput hidden value
- "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
- "X-Requested-With" : "XMLHttpRequest"
- "Referer" : 打刻画面のURL
- Content:
- "ClockType" : 打刻種類
- "LaborSystemID" : "0"
- "LaborSystemCode" : ""
- "LaborSystemName" : ""
- "PositionLatitude" : 緯度
- "PositionLongitude" : 経度
- "PositionAccuracy" : "0"
打刻種類
- 出勤 = "ClockIn"
- 退出 = "ClockOut"
Metadata
Release files for bugyocloudclient 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bugyocloudclient-0.3.0.tar.gz | 9.1 kB | Without provenance | Details for bugyocloudclient-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bugyocloudclient-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for bugyocloudclient-0.3.0-py3-none-any.whl |
Total release size: 22.7 kB
Release files / bugyocloudclient-0.3.0.tar.gz
| Download URL | bugyocloudclient-0.3.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45f1aa3353397ea22bbf2aabd22155d294902024a64126afc0502a6d8068355d
|
|
BLAKE2b-256 checksum How to use checksums |
c140838478e4777cfd44e18a796a258bad4872e4565db4f7063d57cf513c856a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.8.5 Linux/5.4.0-58-generic
|
Release files / bugyocloudclient-0.3.0-py3-none-any.whl
| Download URL | bugyocloudclient-0.3.0-py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7073ce0457d4a3117ed12bf47f11040644daf9e19317bc936177b9d8e1360e27
|
|
BLAKE2b-256 checksum How to use checksums |
745007e79d4cf20711f31ab11fa8e6816f5f97af49bb47acdf847ce2007ad3c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.8.5 Linux/5.4.0-58-generic
|
Security for bugyocloudclient 0.3.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.