Skip to main content

StackOverflowBuddy

StackOverflowBuddy is a Python library that hooks into Python's error handling to automatically fetch Stack Overflow solutions when a script crashes. It is designed to help developers quickly find relevant solutions to their coding problems.

Features

  • Colored Terminal Output: Highlights error messages, links, and headings for better readability.
  • Auto-Open Browser: Allows users to open Stack Overflow links directly in their default browser.
  • Offline Mode Handling: Gracefully handles network errors and provides informative messages when offline.

Installation

You can install StackOverflowBuddy using pip:

pip install stackoverflowbuddy

Usage

To enable StackOverflowBuddy in your Python script, simply add the following lines:

from so_buddy.core import StackOverflowBuddy

buddy = StackOverflowBuddy()
buddy.enable()

Once enabled, StackOverflowBuddy will automatically search for solutions on Stack Overflow whenever an unhandled exception occurs.

Example

from so_buddy.core import StackOverflowBuddy

buddy = StackOverflowBuddy()
buddy.enable()

# Example code that raises an exception
def divide(a, b):
    return a / b

divide(10, 0)

When the above script is run, StackOverflowBuddy will:

  1. Display the error message with colored output.
  2. Search Stack Overflow for relevant solutions.
  3. Display the top 3 results with links and scores.
  4. Allow you to open a link in your browser by typing its number.

Contributing

Contributions are welcome! If you'd like to add new features or fix bugs, please fork the repository and submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

  • Stack Exchange API for providing the data.
  • The Python community for their support and contributions.

Metadata

Release files for so-buddy 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 so-buddy 0.1.0
File Size Uploaded Provenance Actions
so_buddy-0.1.0.tar.gz 4.0 kB Without provenance Details for so_buddy-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 8.6 kB

Release files / so_buddy-0.1.0.tar.gz

Download URL so_buddy-0.1.0.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
68bc8d93d371cfcdd0b18e8ffee62369588b2ab4e1ff921221d9c93580e7fe06
BLAKE2b-256 checksum
How to use checksums
1c7c79cff2e3ac2d4abc1e32868cc5ebce17df87351fa5b275b07a6f5a728246
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

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

Download URL so_buddy-0.1.0-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8cf2a70c97ca85018b1340a1847aaf3385305a98fd4a1a7c5573878d34a2740
BLAKE2b-256 checksum
How to use checksums
d2cae872721893afe30d67d371c84f99ac50e67d2e14614d9ae8ced118dcf038
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for so-buddy 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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