Name | nbqol JSON |
Version |
0.1.1
JSON |
| download |
home_page | None |
Summary | Cross-platform, modular, quality-of-life tool kit for working with Jupyter notebooks |
upload_time | 2025-09-01 06:25:32 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | GPL-3.0-or-later |
keywords |
gpu
ipython
jupyter
notebook
utility
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# NB-QOL
Cross-platform, modular, quality-of-life tool kit for working with Jupyter notebooks wherever you work with them.
## Features
- **CUDA Device Management**: Easily configure, monitor, and select CUDA devices for your notebook
- **Output Capture**: Capture stdout, stderr, and logging in a clean, organized way
- **Path Operations**: Utilities for working with notebook paths and Git repositories
- **IPython Configuration**: Quickly configure IPython settings like autoreload
- **Notebook Styling**: Auto-detect environment and apply appropriate CSS styling (VS Code, Jupyter Lab, etc.)
- **Notebook Processing**: Convert, clean, analyze, and execute notebooks programmatically
- **Environment Detection**: Detect notebook execution environment (VS Code, Jupyter, etc.)
## Installation
From PyPI:
```bash
pip install nbqol
```
Latest development version:
```bash
pip install git+https://github.com/ColinConwell/NB-QOL.git
```
## Quick Start
Here are some examples of what you can do with NB-QOL:
```python
# Import the library
import nbqol
# Configure IPython
nbqol.set_autoreload('complete') # Auto-reload modules
nbqol.hide_warnings() # Hide warning messages
# Get environment settings
env_info = nbqol.get_main_env_settings()
# Manage CUDA devices
nbqol.count_cuda_devices() # Count available CUDA devices
nbqol.cuda_device_report() # Get detailed info about CUDA devices
nbqol.set_cuda_visibles(0) # Make only device 0 visible
# Path operations
notebook_dir = nbqol.notebook_path()
git_root = nbqol.path_to_git_root()
# Capture output
with nbqol.capture_output() as captured:
print("This will be captured")
import logging
logging.warning("This warning will be captured")
print(captured)
# Apply styling
nbqol.auto_style() # Apply appropriate styling based on environment
```
## Command Line Interface
NB-QOL also provides a command-line interface for common tasks:
```bash
# Show version
nbqol --version
# Show help
nbqol --help
# Get CUDA device information
nbqol device-info
# Apply styling to current environment
nbqol style
```
## Documentation
For full documentation, visit [docs/build/html/index.html](docs/build/html/index.html) after building the documentation:
```bash
# Recommended approach (includes tests)
./scripts/build_docs.sh
# Alternative approaches
cd docs && hatch run docs:build
cd docs && make html
cd docs && sphinx-build -b html source build/html
```
The `build_docs.sh` script runs tests to verify the package installation and documentation build before generating the HTML docs.
## Development
```bash
# Clone the repository
git clone https://github.com/ColinConwell/NB-QOL.git
cd NB-QOL
# Install in development mode
pip install -e .
# Install development dependencies
pip install -e .[dev]
# Run tests
pytest tests/
# Install documentation dependencies
pip install -e .[docs]
# Build documentation
cd docs && sphinx-build -b html source build/html
```
## Other Resources
### Related Tools
- [nbdime](https://github.com/jupyter/nbdime) - A tool from the Jupyter team for comparing and diffing Jupyter notebooks.
- [nb-clean](https://github.com/srstevenson/nb-clean) - A tool for cleaning and compression Jupyter notebooks in GitHub and other version control systems.
- [nbstripout](https://github.com/kynan/nbstripout) - A tool for stripping output from Jupyter notebooks for compression or presentation purposes.
### Dependency Source Repos
- [notebook](https://github.com/jupyter/notebook)
- [nbformat](https://github.com/jupyter/nbformat)
- [nbconvert](https://github.com/jupyter/nbconvert)
## License
This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "nbqol",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "gpu, ipython, jupyter, notebook, utility",
"author": null,
"author_email": "Colin Conwell <colinconwell@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/6e/c9/bd1c40f6bfa9b6883f87a450831923f2a8de0ce15313e5fb939295a4e426/nbqol-0.1.1.tar.gz",
"platform": null,
"description": "# NB-QOL\n\nCross-platform, modular, quality-of-life tool kit for working with Jupyter notebooks wherever you work with them.\n\n## Features\n\n- **CUDA Device Management**: Easily configure, monitor, and select CUDA devices for your notebook\n- **Output Capture**: Capture stdout, stderr, and logging in a clean, organized way \n- **Path Operations**: Utilities for working with notebook paths and Git repositories\n- **IPython Configuration**: Quickly configure IPython settings like autoreload\n- **Notebook Styling**: Auto-detect environment and apply appropriate CSS styling (VS Code, Jupyter Lab, etc.)\n- **Notebook Processing**: Convert, clean, analyze, and execute notebooks programmatically\n- **Environment Detection**: Detect notebook execution environment (VS Code, Jupyter, etc.)\n\n## Installation\n\nFrom PyPI:\n```bash\npip install nbqol\n```\n\nLatest development version:\n```bash\npip install git+https://github.com/ColinConwell/NB-QOL.git\n```\n\n## Quick Start\n\nHere are some examples of what you can do with NB-QOL:\n\n```python\n# Import the library\nimport nbqol\n\n# Configure IPython\nnbqol.set_autoreload('complete') # Auto-reload modules\nnbqol.hide_warnings() # Hide warning messages\n\n# Get environment settings\nenv_info = nbqol.get_main_env_settings()\n\n# Manage CUDA devices\nnbqol.count_cuda_devices() # Count available CUDA devices\nnbqol.cuda_device_report() # Get detailed info about CUDA devices\nnbqol.set_cuda_visibles(0) # Make only device 0 visible\n\n# Path operations\nnotebook_dir = nbqol.notebook_path()\ngit_root = nbqol.path_to_git_root()\n\n# Capture output\nwith nbqol.capture_output() as captured:\n print(\"This will be captured\")\n import logging\n logging.warning(\"This warning will be captured\")\nprint(captured)\n\n# Apply styling\nnbqol.auto_style() # Apply appropriate styling based on environment\n```\n\n## Command Line Interface\n\nNB-QOL also provides a command-line interface for common tasks:\n\n```bash\n# Show version\nnbqol --version\n\n# Show help\nnbqol --help\n\n# Get CUDA device information\nnbqol device-info\n\n# Apply styling to current environment\nnbqol style\n```\n\n## Documentation\n\nFor full documentation, visit [docs/build/html/index.html](docs/build/html/index.html) after building the documentation:\n\n```bash\n# Recommended approach (includes tests)\n./scripts/build_docs.sh\n\n# Alternative approaches\ncd docs && hatch run docs:build\ncd docs && make html\ncd docs && sphinx-build -b html source build/html\n```\n\nThe `build_docs.sh` script runs tests to verify the package installation and documentation build before generating the HTML docs.\n\n## Development\n\n```bash\n# Clone the repository\ngit clone https://github.com/ColinConwell/NB-QOL.git\ncd NB-QOL\n\n# Install in development mode\npip install -e .\n\n# Install development dependencies\npip install -e .[dev]\n\n# Run tests\npytest tests/\n\n# Install documentation dependencies\npip install -e .[docs]\n\n# Build documentation\ncd docs && sphinx-build -b html source build/html\n```\n\n## Other Resources\n\n### Related Tools\n\n- [nbdime](https://github.com/jupyter/nbdime) - A tool from the Jupyter team for comparing and diffing Jupyter notebooks.\n- [nb-clean](https://github.com/srstevenson/nb-clean) - A tool for cleaning and compression Jupyter notebooks in GitHub and other version control systems.\n- [nbstripout](https://github.com/kynan/nbstripout) - A tool for stripping output from Jupyter notebooks for compression or presentation purposes.\n\n### Dependency Source Repos\n\n- [notebook](https://github.com/jupyter/notebook)\n- [nbformat](https://github.com/jupyter/nbformat)\n- [nbconvert](https://github.com/jupyter/nbconvert)\n\n\n\n\n## License\n\nThis project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.\n",
"bugtrack_url": null,
"license": "GPL-3.0-or-later",
"summary": "Cross-platform, modular, quality-of-life tool kit for working with Jupyter notebooks",
"version": "0.1.1",
"project_urls": {
"Documentation": "https://colinconwell.github.io/NB-QOL/",
"Homepage": "https://github.com/colinconwell/NB-QOL"
},
"split_keywords": [
"gpu",
" ipython",
" jupyter",
" notebook",
" utility"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "dfa40970dc323e46c3763889ab9250dbd45a042e9d2e05e7a970177f9ac3b9e4",
"md5": "458f8454aa49f74f2c48ad271307fb0a",
"sha256": "4d1e2176c86dc05d7f2aa79d06baba953f2fe009cc7b0f74227bfd3af076e7be"
},
"downloads": -1,
"filename": "nbqol-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "458f8454aa49f74f2c48ad271307fb0a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 40799,
"upload_time": "2025-09-01T06:25:31",
"upload_time_iso_8601": "2025-09-01T06:25:31.128661Z",
"url": "https://files.pythonhosted.org/packages/df/a4/0970dc323e46c3763889ab9250dbd45a042e9d2e05e7a970177f9ac3b9e4/nbqol-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "6ec9bd1c40f6bfa9b6883f87a450831923f2a8de0ce15313e5fb939295a4e426",
"md5": "5027f1bf23828e7b75f141cac2639fd5",
"sha256": "d37e3e13a3860aac34ff763adcda44a300a9bfc2f695f9faa32d3803d110bda7"
},
"downloads": -1,
"filename": "nbqol-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "5027f1bf23828e7b75f141cac2639fd5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 70878,
"upload_time": "2025-09-01T06:25:32",
"upload_time_iso_8601": "2025-09-01T06:25:32.461051Z",
"url": "https://files.pythonhosted.org/packages/6e/c9/bd1c40f6bfa9b6883f87a450831923f2a8de0ce15313e5fb939295a4e426/nbqol-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-01 06:25:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "colinconwell",
"github_project": "NB-QOL",
"github_not_found": true,
"lcname": "nbqol"
}