Skip to main content

License Version Downloads Supported Versions

CodeBuddy v0.0.1

stack overflow search on exception

Overview

codebuddy is a tool for python programmers. On exceptions, it uses the stack overflow public api to search for top answers and returns them in a neat fashion, along with traceback information for debug information.

Examples

Basic Usage

from codebuddy import codebuddy

def main():
    print(7 + "3") # <= that's illegal

codebuddy(main)

This code returns an error, which codebuddy catches and gets stack overflow answers for.

$ python3 main.py

Traceback (most recent call last):
  File "/home/aarushgupta/fun/codebuddy/codebuddy/__init__.py", line 6, in codebuddy
    function()
  File "test.py", line 4, in bob
    print(7 + "3")
TypeError: unsupported operand type(s) for +: 'int' and 'str'

========================================

Exception caught by CodeBuddy: TypeError
----------------------------------------

Stack Overflow search results:

1. TypeError: unsupported operand type(s) for /: 'int' and 'str'
   This code isn't working and keeps giving the error message in the title
   URL to question: https://stackoverflow.com/questions/69506027/typeerror-unsupported-operand-types-for-int-and-str

...

Very neat indeed! The user also gets the description and url to the question in the results as well.

Advanced Usage

codebuddy also supports arguments

from codebuddy import codebuddy

def main(number: int):
    print(number + "3") # <= that's still illegal

codebuddy(main, arguments = [1]) # executes function as "main(1)"

Copyright © 2021 Aarush Gupta

This code is copyrighted but licensed to the public under the GNU AGPLv3 license and any later versions.

Metadata

Release files for codebuddy 0.0.2

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

Source distribution (sdist)

Source distribution for codebuddy 0.0.2
File Size Uploaded Provenance Actions
codebuddy-0.0.2.tar.gz 3.5 kB Without provenance Details for codebuddy-0.0.2.tar.gz

Built distribution (wheel)

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

Total release size: 19.4 kB

Release files / codebuddy-0.0.2.tar.gz

Download URL codebuddy-0.0.2.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f7afd9545dd7779e37bf4b3e6edce068e227216698b7934973e4c787a7abc3de
BLAKE2b-256 checksum
How to use checksums
4394cb4d216192ab4cf721e500e3baba8ea605dce0379c0cbb68ddb79e395ba7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Release files / codebuddy-0.0.2-py3-none-any.whl

Download URL codebuddy-0.0.2-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6dc800ad7711557fc6bc93567dbfbd0ef5ddc68794aa208c7255eb077ab48f3a
BLAKE2b-256 checksum
How to use checksums
f4409228abac1fb2e3f3416e91abd39cb6d1acb4c8469f72425bbd49e8339a8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Security for codebuddy 0.0.2

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.

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