Skip to content

Add Python examples and code tabs to API docs#31

Merged
dannywillems merged 6 commits into
masterfrom
add-python-examples
Apr 20, 2026
Merged

Add Python examples and code tabs to API docs#31
dannywillems merged 6 commits into
masterfrom
add-python-examples

Conversation

@dannywillems
Copy link
Copy Markdown
Contributor

Summary

  • Add Curl/Python tabs to all API doc pages using the Compose theme's
    built-in tab shortcodes
  • Extract all code examples into testable files under examples/api/
    (.sh and .py)
  • Add include-code shortcode to load and syntax-highlight code from
    external files
  • Add plugins API endpoint documentation (GET /api/plugins,
    GET /api/plugins/:name)
  • Add Python client install instructions (v1.1.0+)
  • Add make lint-shell (shellcheck) and make check-examples-python
    (py_compile) targets
  • Add CI steps for shellcheck, Python setup, and leakix client install
  • Standardize all curl examples with api-key header
  • Add __pycache__/ to .gitignore

Test plan

  • CI build passes (shellcheck, Python syntax, Hugo build)
  • Curl/Python tabs render correctly on all API pages
  • Code in tabs displays with proper syntax highlighting
  • Plugins page appears in the API sidebar

- Add example files in examples/api/ (.sh and .py) for each endpoint
- Add include-code shortcode to load code from files with highlighting
- Add Curl/Python tabs to all API doc pages using Compose theme tabs
- Add plugins API endpoint documentation (GET /api/plugins)
- Add Python client install instructions (v1.1.0+)
- Add shellcheck and Python syntax checks to Makefile and CI
- Standardize all curl examples with api-key header
Use variables for API key, query, domain, IP, and plugin name.
Match the same queries and parameters between curl and Python.
URL-encode query parameters with jq for search and bulk.
@dannywillems dannywillems merged commit 705af6a into master Apr 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant