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. Getting started

Simple example

Getting general information about site:

from pystackapi import Site
from pystackapi.sites import StackOverflow

site = Site(StackOverflow)

info = site.get_info()

print(f'Total questions on StackOverflow: {info.total_questions}')

Output:

Total questions in StackOverflow: 23789952
PreviousInstallationNextIndex

Last updated 1 year ago