Skip to main content

Sphinx Extension: Sphinx Algolia Crawler

PyPI PyPI - License

Description

This Sphinx extension (that can also be run standalone) uses Algolia's v1 Crawler API to trigger a crawl. RTD uses Production stage, but Dev stage can be triggered either via standalone Python CLI call or by setting project root .env (see .env.template).

See Algolia Crawler API Doc

Sphinx Setup

Set RTD Env

In ReadTheDocs' env var dashboard, set:

  1. ALGOLIA_CRAWLER_USER_ID
  2. ALGOLIA_CRAWLER_API_KEY
  3. ALGOLIA_CRAWLER_ID

💡 Add this to your root proj .env to test locally (or as a standalone Python app)

conf.py

import sys, os

sys.path.append(os.path.abspath(os.path.join('_extensions', 'sphinx_algolia_crawler')))
extensions = [ 'sphinx_algolia_crawler' ]

# While this example merely turns it on, you probably want to check if RTD /latest production
# See `xbe_docs` `conf.py` for examples of how we checked for this
algolia_crawler_enabled = True

Usage

Standalone

See the -h (help) command:

python3 .\sphinx_algolia_crawler.py -h

Sphinx Ext

If conf.py setup is set and algolia_crawler_enabled, this will automatically trigger when the build is done.

Requirements

  • Python>=3.6
  • Sphinx>=1.8

This may work with older versions, but has not been tested.

Entry Points

At sphinx_algolia_crawler.py:

Sphinx Extension

See setup(app) definition.

Standalone

See if is_standalone: block.

Tested in

  • Windows 11 via PowerShell 7
  • Ubuntu 22.04 WSL2 Shell
  • ReadTheDocs (RTD) CI Deployment (Ubuntu 22.04)

Notes

  • __init__.py is required for both external pathing and to treat the directory as a pkg

Metadata

Release files for sphinx-algolia-crawler 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinx-algolia-crawler 1.0.6
File Size Uploaded
sphinx_algolia_crawler-1.0.6.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-algolia-crawler 1.0.6
File Interpreter ABI Platform
sphinx_algolia_crawler-1.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 10.4 kB

Release files / sphinx_algolia_crawler-1.0.6.tar.gz

Download URL sphinx_algolia_crawler-1.0.6.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ea49f5d0fb8b2a044bca8ac966ef137f4384281026d607d27931978b9fd8aa7b
BLAKE2b-256 checksum
How to use checksums
5d2842acf9507084245c4b4e0d6b8c09299cee66b28dc04f7695e8a55311e339
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.16

Release files / sphinx_algolia_crawler-1.0.6-py3-none-any.whl

Download URL sphinx_algolia_crawler-1.0.6-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57b37f26b6aa6c76bbb85dfba41283d452404bf9df7e339c2c30a677ad0c9901
BLAKE2b-256 checksum
How to use checksums
05acd38b030c8ba17b9c86c8d4f8815ebd2186be3cc047cc833b92ddec996a79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.16

Release history Release notifications | RSS feed

This release

1.0.6 This release

2 release files

1.0.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page