Settings

Theme

Show HN: Pythondocs.xyz – Live search for Python documentation

pythondocs.xyz

74 points by danosull 4 years ago · 15 comments · 1 min read

Reader

Hi everyone!

I've been working on a web search interface for Python's documentation as a personal project, and I think it's ready for other people to use...

Please give it a go (and join me in praying to the server gods):

https://pythondocs.xyz/

Here's the tech stack for those interested:

- Parser: Beautiful Soup + Mozilla Bleach

- Database: in-memory SQLite (aiosqlite) + SQLAlchemy

- Web server: FastAPI + Uvicorn + Jinja2

- Front end: Tailwind CSS + htmx + Alpine.js

I have ideas for future improvements but hopefully the current version is useful to someone.

Let me know what you think!

amanzi 4 years ago

Looks like it was a fun project but I prefer the flexibility of https://devdocs.io as I can keep all my framework docs searchable from one place. Also the instant lookup in DevDocs is super useful, especially for Python: https://devdocs.io/python~3.10/

  • lepture 4 years ago

    I agree. And the search results are not good in pythonsocs.xyz. Although I’ve upvoted this thread.

    • danosullOP 4 years ago

      Useful comments, thanks!

      Better search results is my next big feature. I'm thinking about "sort by relevance", improved keyword and Python language parsing, and so on.

      And DevDocs is great :)

showmecode 4 years ago

This may be a weird ask but it would be great if you could provide more emphasis to source code links for standard library results. E.g. searching for heapq would also show a link to https://github.com/python/cpython/blob/main/Lib/heapq.py

I know these links are already at the very top of most pages in the python documentation but they are easily missed and it would be good for search tools to provide a nudge to the actual source.

  • danosullOP 4 years ago

    That's a great, suggestion thank you.

    A related thought is that I'd like to pull out results like built-in functions and Standard Library modules to make them more prominent, and perhaps a link to the source code could be presented alongside...

ystad 4 years ago

Looks really nice!.

Feature-request: Would love auto-suggest as I type. one of my favorite example(s) is Algolia's doc search https://www.algolia.com/doc/

thealistra 4 years ago

I tried "typeof" and "is" and results were not what I wanted.

Is there indexing for language keywords?

  • danosullOP 4 years ago

    Not right now, although it's something I'm interested in adding!

    You can get usually get quite good results by selecting Standard Library and Definitions, though.

    "is" is a special case as I currently enforce a 3 character minimum to keep the number of live search results sane.

drcongo 4 years ago

Small feedback: I tried `Iterable` as the search term and there's no mention of `typing.Iterable` on the first page - case sensitivity may help?

  • danosullOP 4 years ago

    Very useful feedback, thank you.

    The ordering of search results is currently very crude - it's basically just alphabetical. I plan to add "order by relevance" in the future, and I'll definitely bear capitalisation in mind.

clircle 4 years ago

Does python not have built in documentation search? In R I use `??searchterm`.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection