This PR replaces the old ReadTheDocs/Sphinx documentation setup with a static GitHub Pages site for serpapi-python (using the great-docs Python package).
The docs build will generate a static site that can be automatically deployed to GitHub Pages at serpapi.github.io/serpapi-python when a new version is released.
When docs are built
Deployed docs are built from the release workflow on version tags matching v**.
Adds doc tests. The code snippets present in docs pages are included in the pytest suite of the package via tests/test_docs_examples.py, which executes Python fenced code blocks from:
README.md
docs/index.md
docs/user_guide/*.md
docs/examples/*.md
The test uses SERPAPI_KEY or API_KEY, replaces placeholder secret_api_key values, and supports <!-- docs-test: skip ... --> for examples that should not run, such as proxy/TLS placeholder snippets.
pyproject.toml also enables module doctests for serpapi.
Removed old docs setup
Removes the ReadTheDocs/Sphinx files:
.readthedocs.yaml
docs/Makefile
docs/conf.py
docs/requirements.txt
docs/index.rst
docs/_static/serpapi-python.png
.gitignore now ignores the generated great-docs/ output instead of docs/build.
Docs structure overview
Adds:
great-docs.yml for site configuration, navigation, API reference grouping, theme settings, and llms.txt pre-render generation.
docs/index.md as the docs homepage.
docs/user_guide/ pages for setup, client usage, parameters, pagination, errors/timeouts, account/location helpers, migration, async archive, threading, multiprocessing, zero trace, JSON Restrictor, and request options.
docs/examples/ pages grouped by search engines, AI answers, local/maps, shopping, travel, finance/trends/jobs/events, media/apps/research.
custom SerpApi branding and docs styling in assets/.
scripts/build_llms_txt.py so /llms.txt includes useful homepage/getting-started context, not only API reference links.
Python docstrings of core.py and models.py files are changed to match the great-docs supported format.
No core code changes are made. PR touches doc-related functionality only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR replaces the old ReadTheDocs/Sphinx documentation setup with a static GitHub Pages site for serpapi-python (using the great-docs Python package).
When docs are built
Deployed docs are built from the release workflow on version tags matching v**.
The release flow is now:
New dependency
Adds an optional docs extra:
New docs tests
Adds doc tests. The code snippets present in docs pages are included in the pytest suite of the package via tests/test_docs_examples.py, which executes Python fenced code blocks from:
The test uses SERPAPI_KEY or API_KEY, replaces placeholder secret_api_key values, and supports <!-- docs-test: skip ... --> for examples that should not run, such as proxy/TLS placeholder snippets.
pyproject.toml also enables module doctests for serpapi.
Removed old docs setup
Removes the ReadTheDocs/Sphinx files:
.gitignore now ignores the generated great-docs/ output instead of docs/build.
Docs structure overview
Adds:
Screenshots: