rafaelassacconi / stackoverflow

Python Wrapper for Stack Exchange API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python Stack Overflow Wrapper

Python Wrapper for Stack Exchange API.

How to use

Install this package:

pip install git+https://github.com/rafaelassacconi/stackoverflow.git

Example of searching questions by tag:

from stackoverflow.api import StackOverflow

stackoverflow = StackOverflow()
result_list = stackoverflow.search_questions("python")

for item in result_list:
    print(item["title"])
    print(item["link"])

Example of searching questions by multiple tags and max number of results:

stackoverflow.search_questions(tags="python;test;tdd", max=5)

Methods

The first version of this wrapper contains one method:

Method Description
search_questions Returns a list of questions related with the tags used in searching

Tests

For run the tests, install the pytest package and run the command bellow:

pytest

About

Python Wrapper for Stack Exchange API.


Languages

Language:Python 100.0%