Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lasuillard/mockbook
Docker image for Jupyter + FastAPI to write mocks.
https://github.com/lasuillard/mockbook
docker jupyter mock-server python
Last synced: 27 days ago
JSON representation
Docker image for Jupyter + FastAPI to write mocks.
- Host: GitHub
- URL: https://github.com/lasuillard/mockbook
- Owner: lasuillard
- License: mit
- Created: 2024-11-01T13:47:09.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-12-03T23:42:14.000Z (about 1 month ago)
- Last Synced: 2024-12-04T00:27:58.559Z (about 1 month ago)
- Topics: docker, jupyter, mock-server, python
- Language: Python
- Homepage: https://hub.docker.com/r/lasuillard/mockbook
- Size: 14.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mockbook
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/lasuillard/mockbook/main.svg)](https://results.pre-commit.ci/latest/github/lasuillard/mockbook/main)
![GitHub Release](https://img.shields.io/github/v/release/lasuillard/mockbook)Docker image for Jupyter + FastAPI to write mocks.
![Demo](/docs/demo.gif)
## ✨ Features
Basically, Mockbook is an simple [FastAPI](https://github.com/fastapi/fastapi) application with following features:
- FastAPI server with live reloading enabled (Uvicorn built-in)
- Maintain mock endpoints using [Jupyter](https://jupyter.org/) Notebook (works by importing all cells in notebooks)
- Pre-installed libraries for writing mocks: [factory-boy](https://github.com/FactoryBoy/factory_boy), [Faker](https://github.com/joke2k/faker)
## 📔 Usage
You can try this image with Docker Compose by simply checking it out and running `docker compose up --build`. For more details, please check `docker-compose.yaml` file.
To pull and run image from [Docker Hub](https://hub.docker.com/r/lasuillard/mockbook), as follow:
```bash
$ docker run --rm \
-p 127.0.0.1:8000:8000 \
-p 127.0.0.1:8888:8888 \
-e JUPYTERLAB_ARGS='--NotebookApp.token=token' \
lasuillard/mockbook:main
```Following endpoints will be available:
- http://localhost:8000/docs for FastAPI OpenAPI documentation.
- http://localhost:8888 for Jupyter Lab web UI for browsers.