docs
  • Getting started
    • Welcome
    • 📥Installation
    • Simple example
  • API reference
    • Index
    • Module "sites"
    • Class "Site"
    • Class "Network"
    • Exceptions
  • Recipes
    • Index
    • Answers
    • Badges
    • Questions
    • Search
    • Site info
    • Users
Powered by GitBook
On this page
  1. Recipes

Site info

Getting general information about site:

from pystackapi import Site
from pystackapi.sites import StackOverflow

site = Site(StackOverflow)  # Creating a Site class for the StackOverflow site

info = site.get_info()  # Calling the necessary method

print(info.total_questions)  # Getting the necessary key

Output:

23789952
PreviousSearchNextUsers

Last updated 1 year ago