A Python package for easy interaction with the Hatena Bookmark API
Project description
hatebpy
hatebpyは、はてなブックマークAPIを簡単に利用するためのPythonライブラリです。
特徴
- はてなブックマークAPIの主要機能をサポート
- 簡単な認証プロセス
- タイプヒントによる型安全性
- フィード検索機能
インストール
pipを使用してインストールできます:
pip install hatebpy
使用方法
認証
はてなブックマークAPIを使用するには、OAuthによる認証が必要です。以下のコマンドを実行して認証を行います:
hatebpy <consumer_key> <consumer_secret>
基本的な使用例
from hatebpy import HatenaBookmarkClient, OAuth1Auth
# クライアントの初期化
auth = OAuth1Auth(CONSUMER_KEY, CONSUMER_SECRET, OAUTH_TOKEN, OAUTH_TOKEN_SECRET)
client = HatenaBookmarkClient(auth)
# ブックマークの取得
bookmark = client.get_bookmark("https://example.com")
print(bookmark)
# ブックマークの更新
updated_bookmark = client.update_bookmark(
url="https://example.com",
comment="example.com test",
tags=["example", "test"]
)
print(updated_bookmark)
より詳細な使用方法については、使用方法のドキュメントを参照してください。
開発
依存関係のインストール
pip install -r requirements.txt
テストの実行
pytest
ライセンス
このプロジェクトはMITライセンスの下で公開されています。
貢献
バグ報告、機能リクエスト、プルリクエストなど、あらゆる形での貢献を歓迎します。大きな変更を加える前に、まずissueを開いて議論してください。
作者
K(rmc-8.com)
謝辞
- はてなブックマークAPIを提供してくださっているはてな株式会社に感謝します。
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
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 hatebpy-0.1.0.tar.gz.
File metadata
- Download URL: hatebpy-0.1.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2284c20cd036584124de4c4b0d1907bf57c3db9809733b76e51da277bf0c53dc
|
|
| MD5 |
4b85759cbbe9782c876353efe4746500
|
|
| BLAKE2b-256 |
fa6f875140cf1955c3558e687217b8864bde62375ea90d0ea422a381863bdecd
|
File details
Details for the file hatebpy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hatebpy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0f79b0b2ecb3b74437d2df9c6ec0bbdfde48fd18a111e12d3e8d4b8a1163ced
|
|
| MD5 |
4a6c516eb3c7cddbbd0d52243fad7e8e
|
|
| BLAKE2b-256 |
56d1aab7159ec84901d92d6d11ae245b5106bbf896e7ce3f2890bebc1750f426
|