Skip to main content

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を提供してくださっているはてな株式会社に感謝します。

Metadata

Release files for hatebpy 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hatebpy 0.1.0
File Size Uploaded
hatebpy-0.1.0.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hatebpy 0.1.0
File Interpreter ABI Platform
hatebpy-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.8 kB

Release files / hatebpy-0.1.0.tar.gz

Download URL hatebpy-0.1.0.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2284c20cd036584124de4c4b0d1907bf57c3db9809733b76e51da277bf0c53dc
BLAKE2b-256 checksum
How to use checksums
fa6f875140cf1955c3558e687217b8864bde62375ea90d0ea422a381863bdecd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.5

Release files / hatebpy-0.1.0-py3-none-any.whl

Download URL hatebpy-0.1.0-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a0f79b0b2ecb3b74437d2df9c6ec0bbdfde48fd18a111e12d3e8d4b8a1163ced
BLAKE2b-256 checksum
How to use checksums
56d1aab7159ec84901d92d6d11ae245b5106bbf896e7ce3f2890bebc1750f426
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page