example-code-2e/22-async/mojifinder
dependabot[bot] ca68e2e7e7
build(deps): bump fastapi from 0.63.0 to 0.65.2 in /22-async/mojifinder
Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.63.0 to 0.65.2.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](https://github.com/tiangolo/fastapi/compare/0.63.0...0.65.2)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-10 15:57:02 +00:00
..
static update from O'Reilly repo 2021-03-22 12:24:21 -03:00
bottle.py ch22: new README.md and minor edits 2021-04-24 20:49:53 -03:00
charindex.py update from O'Reilly repo 2021-03-22 12:24:21 -03:00
README.md Update README.md 2021-04-24 20:51:33 -03:00
requirements.txt build(deps): bump fastapi from 0.63.0 to 0.65.2 in /22-async/mojifinder 2021-06-10 15:57:02 +00:00
tcp_mojifinder.py complete draft: update from Atlas 2021-06-09 00:13:02 -03:00
web_mojifinder_bottle.py ch22: new README.md and minor edits 2021-04-24 20:49:53 -03:00
web_mojifinder.py ch22: new README.md and minor edits 2021-04-24 20:49:53 -03:00

Mojifinder: Unicode character search examples

Examples from Fluent Python, Second Edition—Chapter 22, Asynchronous Programming.

How to run web_mojifinder.py

web_mojifinder.py is a Web application built with FastAPI. To run it, first install FastAPI and an ASGI server. The application was tested with Uvicorn.

$ pip install fastapi uvicorn

Now you can use uvicorn to run the app.

$ uvicorn web_mojifinder:app

Finally, visit http://127.0.0.1:8000/ with your browser to see the search form.

Directory contents

These files can be run as scripts directly from the command line:

  • charindex.py: libray used by the Mojifinder examples. Also works as CLI search script.
  • tcp_mojifinder.py: TCP/IP Unicode search server. Depends only on the Python 3.9 standard library. Use a telnet application as client.
  • web_mojifinder_bottle.py: Unicode Web service. Depends on bottle.py and static/form.html. Use an HTTP browser as client.

This program requires an ASGI server to run it:

  • web_mojifinder.py: Unicode Web service. Depends on FastAPI and static/form.html.

Support files:

  • bottle.py: local copy of the single-file Bottle Web framework.
  • requirements.txt: list of dependencies for web_mojifinder.py.
  • static/form.html: HTML form used by the web_* examples.
  • README.md: this file 🤓