/fastapi-nbdev

Proof of concept of using FastAPI with Nbdev

Primary LanguageJupyter NotebookApache License 2.0Apache-2.0

fastapi-nbdev

A small proof of concept FastaApi that shows how to create a really simple app with one route via the routers mechanism.

If there are any questions, do not hesitate to set up an issue 😊.

Install

git clone https://github.com/MeesMolenaar/fastapi-nbdev.git

Running the Application

Whenever you change main, a route or add a route. You will have to run nbdev_export so that your package is updated.

nbdev_export: Export notebooks in path to Python modules

After running above comamand, you can start the FastAPI app with the following command from the root folder (i.e. fastapi-nbdev):

uvicorn fastapi_nbdev.main:app –reload

Lastly, run nbdev_prepare. This is last, since you want to export and run your changes before running the tests.

nbdev_prepare: Export, test, and clean notebooks, and render README if needed