Examples

Mini example

The mini example demonstrates Sentaku usage by searching a package on pypi and opening the first result in a browser

Sentaku pypi search exampple

before running:

$ pip install selenium  requests sentaku
class mini_example.Search(parent, base_url='https://pypi.python.org/pypi')[source]

sentaku element for really simple pypi searching

mini_example.cli_main()[source]

cli entrypoitns, sets up everything needed

mini_example.main(search, query)[source]

main function that does the search

mini_example.search_browser(self, text)[source]

do a slow search via the website and return the first match

mini_example.search_fast(self, text)[source]

do a sloppy quick “search” via the json index

Todo example

The todo example demonstrates Sentaku usage in a more complex manner. A Example Todo list manager that has Multiple interfaces and api differences between them.

Structure Description

The Todo list example has 3 entrypoints

todo_example.api.TodoApp
The Basic implementation as “internal api”
todo_example.ux.TodoUX
A pseudo-ux sharing the api with todo_example.api.TodoApp
todo_example.pseudorpc.PseudoRpc
A pseudo RPC exposing the bahaviour using a different api