Skip to main content

A package for an_debughelper.

Project description

an_DebugHelper

an_DebugHelper は、Python スクリプトのデバッグを簡単に行うための便利なツールです。
ログ出力、エラーハンドリング、デバッグメッセージの管理を容易にする機能を提供します。

🚀 特徴

  • 簡単なログ管理: 標準出力、ファイル出力の両方に対応
  • エラーハンドリング: スクリプトのエラーメッセージを分かりやすく記録
  • デバッグメッセージの統一管理: コードの流れを追いやすくする設計

📦 インストール

PyPI からインストール:

pip install an_debughelper

または、GitHub から直接インストール:

pip install git+https://github.com/Atsushi888/an_DebugHelper.git

📌 使い方

基本的なデバッグメッセージの出力

from an_debughelper import DebugHelper

debug = DebugHelper()

debug.log_step("処理開始", success=None)
debug.log_step("ファイルを読み込み中...", char="📂")
debug.log_step("エラーが発生しました!", success=False)
debug.log_step("処理完了", success=True)

出力結果:

[DebugHelper] 🔹 処理開始
[DebugHelper] 📂 ファイルを読み込み中...
[DebugHelper]  エラーが発生しました!
[DebugHelper]  処理完了

例外処理との統合

try:
    result = 10 / 0  # ゼロ除算エラー
except Exception as e:
    debug.log_step(f"エラー発生: {e}", success=False)

🛠 開発者向け情報

環境変数を利用する場合

import os
from dotenv import load_dotenv

load_dotenv()

DEBUG_MODE = os.getenv("DEBUG_MODE", "False")  # デフォルトは False

📜 ライセンス

このプロジェクトは MIT ライセンス のもとで提供されます。詳細は LICENSE を参照してください。

📞 お問い合わせ

バグ報告・機能リクエストは GitHub  Issues にて受け付けています。
ご質問があれば、Atsushi888 までお問い合わせください。

---

## **使い方**
- `LICENSE`  `an_DebugHelper/` ディレクトリに配置
- `README.md`  `an_DebugHelper/` ディレクトリに配置

この `README.md` は、GitHub リポジトリと PyPI のパッケージページの両方で表示されるようになります。  
特に **PyPI のフォーマット** では `long_description_content_type="text/markdown"` を設定する必要がありますので、`pyproject.toml` にこの設定を追加してください。

もし内容を修正したい点があれば教えてください!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

an_debughelper-1.3.3.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

an_debughelper-1.3.3-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file an_debughelper-1.3.3.tar.gz.

File metadata

  • Download URL: an_debughelper-1.3.3.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for an_debughelper-1.3.3.tar.gz
Algorithm Hash digest
SHA256 b932f82eed2357017e4ab18424b38af09b08ef389a8e5e8e26df0824a4fceabe
MD5 39ab307c0fdf608626d925a7eca7c2a8
BLAKE2b-256 7b9c830fb05c92abcabd411d73ff24ada57101340f0121b0378aa5c47e2536f9

See more details on using hashes here.

File details

Details for the file an_debughelper-1.3.3-py3-none-any.whl.

File metadata

  • Download URL: an_debughelper-1.3.3-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for an_debughelper-1.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 30b1d171da735bddfc995c541987d9fa6720dc847118eff0e520844a4991b401
MD5 11e07f2a66af0c120d9088d04caf4bc4
BLAKE2b-256 1e0396ca963f954f899439a9208f240b741f3a7759c3f907acc0404c9f49704b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page