Python Clinet Library of Annowork WebAPI
Project description
annowork-api-python-client
Annowork WebAPIのPython用クライントライブラリです。
Requirements
- Python 3.8+
Install
$ pip install annoworkapi
Usage
認証情報の設定方法
$HOME/.netrc
machine annowork.com
login ${user_id}
password ${password}
環境変数に設定する場合
環境変数ANNOWORK_USER_IDにユーザID, ANNOWORK_PASSWORD にパスワードを設定する。
基本的な使い方
import annoworkapi
service = annoworkapi.build()
result = service.api.get_my_account()
print(result)
# {'account_id': 'xxx', ... }
応用的な使い方
ログの出力
import logging
logging_formatter = '%(levelname)-8s : %(asctime)s : %(name)s : %(message)s'
logging.basicConfig(format=logging_formatter)
logging.getLogger("annoworkapi").setLevel(level=logging.DEBUG)
In [1]: c = s.api.get_actual_working_times_by_workspacen_member("a9956d30-b201-418a-a03b-b9b8b55b2e3d", "204bf4d9-4569-4b7b-89b9-84f089201247")
DEBUG : 2022-01-11 17:36:04,354 : api.py : annoworkapi.api : _request_wrapper : Sent a request :: {'request': {'http_method': 'get', 'url': 'https://annowork.com/api/v1/workspacens/a9956d30-b201-418a-a03b-b9b8b55b2e3d/members/204bf4d9-4569-4b7b-89b9-84f089201247/actual-working-times', 'query_params': None, 'header_params': None, 'request_body': None}, 'response': {'status_code': 200, 'content_length': 209988}}
開発者用ドキュメント
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
annoworkapi-3.2.1.tar.gz
(19.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file annoworkapi-3.2.1.tar.gz.
File metadata
- Download URL: annoworkapi-3.2.1.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.13 Linux/6.5.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f972c96648d9dd8dbfe58ed02ab255545a3e1bdefaddfe0ddd8b72fecd051355
|
|
| MD5 |
1036ef9bbbe235670e1f324362224740
|
|
| BLAKE2b-256 |
74b881190f5ec1ef8b5139b4b8b518d3cec487221e3c7fbeb6bafbaadd7e512b
|
File details
Details for the file annoworkapi-3.2.1-py3-none-any.whl.
File metadata
- Download URL: annoworkapi-3.2.1-py3-none-any.whl
- Upload date:
- Size: 22.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.13 Linux/6.5.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa3db300a0accd3d75918a181ff5f0bc530895b80d2c60831a02197bb303a05e
|
|
| MD5 |
d6fc9687855e83932062ebf5dfdf2627
|
|
| BLAKE2b-256 |
ca102db14796dbb487b85607b98a3135d8a74d0c4cfdd98423a727ad2e214f88
|