cipdb


Namecipdb JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryConditional iPDB - Simple conditional debugging for Python
upload_time2025-08-28 21:58:10
maintainerNone
docs_urlNone
authorNone
requires_python>=3.6
licenseMIT
keywords debugging ipdb pdb conditional breakpoint
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <!-- ---
!-- Timestamp: 2025-08-29 04:53:00
!-- Author: ywatanabe
!-- File: /home/ywatanabe/proj/cipdb/README.md
!-- --- -->

# cipdb - Conditional iPDB

Simple conditional debugging for Python with ID-based breakpoint control.

[![PyPI version](https://badge.fury.io/py/cipdb.svg)](https://badge.fury.io/py/cipdb)
[![Python 3.6+](https://img.shields.io/badge/python-3.6+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Installation

```bash
pip install cipdb
```

## Quick Start

### Control by Global State Call in Python

```python
# Disable all debugging programmatically
cipdb.disable()
```

# Disable all debugging by Environmental Variable

``` python
CIPDB_ID=false python your_script.py
```

### Control by Boolean

```python
import cipdb

cipdb.set_trace()       # Identical with ipdb.set_trace()
cipdb.set_trace(False)  # Identical with pass
cipdb.set_trace(os.getenv("DEBUG")) # Development vs Production
cipdb.set_trace(os.getenv("AGENT_ID")=="DebuggingAgent_01") # Runner Specific for debugging by multiple agent
```

### Control by Breakpoint IDs
``` python
# your_script.py
def process_user(user):
    cipdb.set_trace(id="validate")
    validate(user)
    
    cipdb.set_trace(id="save")
    save_user(user)
    
    cipdb.set_trace(id="notify")
    send_notification(user)
```

``` bash
# Development mode: All ID breakpoints work (no env vars needed)
python your_script.py                            # All ID breakpoints trigger

# Production mode: Control with environment variables
CIPDB_IDS=validate,save python your_script.py   # Only stops at validate and save
CIPDB_IDS=save python your_script.py            # Only stops at save
CIPDB_ID=save python your_script.py             # Only stops at save (Equivalent to CIPDB_IDS=save)
```

## Priority Logic

Global Control > `CIPDB=false` Environmental Variable > ID Matching > Boolean Conditioning

## License

MIT

<!-- EOF -->

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cipdb",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "ywatanabe <Yusuke.Watanabe@scitex.ai>",
    "keywords": "debugging, ipdb, pdb, conditional, breakpoint",
    "author": null,
    "author_email": "ywatanabe <Yusuke.Watanabe@scitex.ai>",
    "download_url": "https://files.pythonhosted.org/packages/28/f9/2d18fe66df4883313183b16db3ec36651d4c9032f995422ba0b90927ec7d/cipdb-0.1.0.tar.gz",
    "platform": null,
    "description": "<!-- ---\n!-- Timestamp: 2025-08-29 04:53:00\n!-- Author: ywatanabe\n!-- File: /home/ywatanabe/proj/cipdb/README.md\n!-- --- -->\n\n# cipdb - Conditional iPDB\n\nSimple conditional debugging for Python with ID-based breakpoint control.\n\n[![PyPI version](https://badge.fury.io/py/cipdb.svg)](https://badge.fury.io/py/cipdb)\n[![Python 3.6+](https://img.shields.io/badge/python-3.6+-blue.svg)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## Installation\n\n```bash\npip install cipdb\n```\n\n## Quick Start\n\n### Control by Global State Call in Python\n\n```python\n# Disable all debugging programmatically\ncipdb.disable()\n```\n\n# Disable all debugging by Environmental Variable\n\n``` python\nCIPDB_ID=false python your_script.py\n```\n\n### Control by Boolean\n\n```python\nimport cipdb\n\ncipdb.set_trace()       # Identical with ipdb.set_trace()\ncipdb.set_trace(False)  # Identical with pass\ncipdb.set_trace(os.getenv(\"DEBUG\")) # Development vs Production\ncipdb.set_trace(os.getenv(\"AGENT_ID\")==\"DebuggingAgent_01\") # Runner Specific for debugging by multiple agent\n```\n\n### Control by Breakpoint IDs\n``` python\n# your_script.py\ndef process_user(user):\n    cipdb.set_trace(id=\"validate\")\n    validate(user)\n    \n    cipdb.set_trace(id=\"save\")\n    save_user(user)\n    \n    cipdb.set_trace(id=\"notify\")\n    send_notification(user)\n```\n\n``` bash\n# Development mode: All ID breakpoints work (no env vars needed)\npython your_script.py                            # All ID breakpoints trigger\n\n# Production mode: Control with environment variables\nCIPDB_IDS=validate,save python your_script.py   # Only stops at validate and save\nCIPDB_IDS=save python your_script.py            # Only stops at save\nCIPDB_ID=save python your_script.py             # Only stops at save (Equivalent to CIPDB_IDS=save)\n```\n\n## Priority Logic\n\nGlobal Control > `CIPDB=false` Environmental Variable > ID Matching > Boolean Conditioning\n\n## License\n\nMIT\n\n<!-- EOF -->\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Conditional iPDB - Simple conditional debugging for Python",
    "version": "0.1.0",
    "project_urls": {
        "Documentation": "https://github.com/ywatanabe/cipdb",
        "Homepage": "https://github.com/ywatanabe/cipdb",
        "Issues": "https://github.com/ywatanabe/cipdb/issues",
        "Repository": "https://github.com/ywatanabe/cipdb"
    },
    "split_keywords": [
        "debugging",
        " ipdb",
        " pdb",
        " conditional",
        " breakpoint"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f72a396405dbbe488f232b3859e628c062912ce63da57a2ea8fc497cceaa62a6",
                "md5": "bb790062bfa49b124cac40f69c94a93b",
                "sha256": "b0f4c6e130900439b18726dc5d23114d8cb3235c3af490f863c4385bda989d33"
            },
            "downloads": -1,
            "filename": "cipdb-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bb790062bfa49b124cac40f69c94a93b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 7287,
            "upload_time": "2025-08-28T21:58:08",
            "upload_time_iso_8601": "2025-08-28T21:58:08.896716Z",
            "url": "https://files.pythonhosted.org/packages/f7/2a/396405dbbe488f232b3859e628c062912ce63da57a2ea8fc497cceaa62a6/cipdb-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "28f92d18fe66df4883313183b16db3ec36651d4c9032f995422ba0b90927ec7d",
                "md5": "c061d644072d618bdd19a67d3c1857f4",
                "sha256": "23aba28e25de79d454af48e0dda930915012c312ed8fdd43bcb56b5bf7d8b4f9"
            },
            "downloads": -1,
            "filename": "cipdb-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c061d644072d618bdd19a67d3c1857f4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 7203,
            "upload_time": "2025-08-28T21:58:10",
            "upload_time_iso_8601": "2025-08-28T21:58:10.662757Z",
            "url": "https://files.pythonhosted.org/packages/28/f9/2d18fe66df4883313183b16db3ec36651d4c9032f995422ba0b90927ec7d/cipdb-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-28 21:58:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ywatanabe",
    "github_project": "cipdb",
    "github_not_found": true,
    "lcname": "cipdb"
}
        
Elapsed time: 1.99145s