Skip to main content

StackSearch is a python module that provides a way to search StackOverflow.

Project description

stacksearch 🔎

Build Status Code style: black GitHub code size in bytes Scrutinizer code quality (GitHub/Bitbucket) PyPI GitHub release (latest by date) PyPI - Implementation PyPI - Python Version PyPI - Wheel PyPI - License GitHub top language GitHub language count

StackSearch is a python module that provides a way to search StackOverflow.

The reason this is better than other modules is that this module provides a modern API, a beautiful command-line interface via argparse and blessings, all in pure Python.

It is also available as a standalone command-line tool, so you may run it directly like so:

stacksearch This is the query

without the python3 -m prefix, if desired.

It also has an API which you can use via

>>> from stackoverflow import Search
>>> Search.Search("This is the query")

Have fun!

Benefits 👍

The benefits of this module as opposed to the other StackOverflow-searching modules is that this module provides the following:

  • The ability to return a dictionary of ALL the search results found, not just the first result
  • The ability to return results from a variety of different StackExchange sites
  • A beautiful command-line interface for humans
  • A decently documented API
  • An optional asynchronous API
  • Decently easy-to-read code (formatted with Black)
  • And open source code on GitHub

Downsides 👎

  • Possibly slower than the other modules
  • The first PyPi project ever made by ThatXliner
  • Not fully (completely) optimized (well, after all, it's python)
  • A big list of dependencies (shortened in version 1.0.0 or so)

Current Features 😁

  • Everything listed in the 'Benefits' section of the README above
  • Mostly, if not fully, type-hinted
  • A beautiful, simple, yet powerful command-line interface (via argparse and blessings)
  • Asynchronous StackOverflow requests!
  • The ability to crank out raw JSON data to use
  • And an API

Future Features 🏃‍♂️

  • Asynchronous StackOverflow requests! (Done in v1.1.0)
  • Documentation
  • Object-oriented APIs
  • Python backwards-compatibility
  • Being able to scrape all StackOverflow sites/pages
  • A better README (Done in v1.0.0.1)
  • Being able to output different formats of data (e.g. YAML, TOML, XML, etc)
  • And more command-line options

Usage Examples

  • For creating a text editor extension built on this package

  • For searching StackOverflow and/or other StackExchange websites without leaving the Terminal (for those Vim people)

  • For getting lots of answers from all StackExchange sites you know

License

MIT License

Copyright (c) 2020 ThatXliner

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Code style guide 😳

Black. We (I, right now.) use the black formatter to format our code. It's pretty strict.

Contributing ✏️

GitHub contributors

Due to the fact that I have a GitHub secret on the repository, no one here will be a pull-requestless contributor, meaning all contributors will need to contribute to the project via pull-request and/or issue reports. Though, there are exceptions.

Links 📎

GitHub (Possibly this page)

PyPi (Possibly this page)

Travis-CI

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stacksearch-1.2.4.tar.gz (10.7 kB view hashes)

Uploaded Source

Built Distribution

stacksearch-1.2.4-py3-none-any.whl (11.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page