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 PyPI PyPI - Implementation PyPI - Python Version PyPI - License GitHub top language GitHub language count Documentation Status

NOTE: STACKSEARCH IS NO LONGER ACTIVELY MAINTAINED. There will still be the occasional bug fixes and updates, but not as much.

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 (Sort of added in v1.2.8)
  • 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.

We also use NumPy style docstrings.

Contributing ✏️

GitHub contributors

Please feel free to contribute!

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.3.10.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stacksearch-1.3.10-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file stacksearch-1.3.10.tar.gz.

File metadata

  • Download URL: stacksearch-1.3.10.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.0

File hashes

Hashes for stacksearch-1.3.10.tar.gz
Algorithm Hash digest
SHA256 0d8869ccddbaa42b2b08b0c5ee6975e3eacc5be8b993e088dc334ec49beda9f9
MD5 c14c6aa2277b6b63e4b3d2265975e2f6
BLAKE2b-256 f9d4eb4a2c90c1e6adb16ff5bcc7ed15060ee0509cd7818ae56d44606dae63fa

See more details on using hashes here.

File details

Details for the file stacksearch-1.3.10-py3-none-any.whl.

File metadata

  • Download URL: stacksearch-1.3.10-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.0

File hashes

Hashes for stacksearch-1.3.10-py3-none-any.whl
Algorithm Hash digest
SHA256 493b087bd0de9e6b831b2b2d9944fbbe071a4f0eea27bf8414417945c0a7c345
MD5 64863d16327a096e3644d9fca946d157
BLAKE2b-256 8dc2863dba423b42fa12696f44d62b0ea0dbe4b5050911423e8752e83e5cf468

See more details on using hashes here.

Supported by

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