Skip to content

Line chatbot implementation, with fastapi framework and using redis as cache.

License

Notifications You must be signed in to change notification settings

DarkbordermanTemplate/fastapi-redis-linebot

Repository files navigation

fastapi-redis-linebot

Line chatbot implementation, with fastapi framework and using redis as cache.

Integration Build

Development

Prerequisitive

Name Version
Python 3.8
pipenv(Python module) 2018.11.26 or up

Environment setup

  1. Initialize environment variable
cp sample.env .env
  1. Initialize Python environment
make init
  1. Enter the environment and start developing
pipenv shell
  1. Start related components of API service
make service_up
  1. Start API service
cd api/
uvicorn app:APP

The server will run at http://127.0.0.1:8000

  1. (Optional)Stop related components of API service
make service_down

Formatting

This project uses black and isort for formatting

make reformat

Linting

This project uses pylint and flake8 for linting

make lint

Testing

This project uses pytest and its extension(pytest-cov) for testing

make test

Deployment

Prerequisitive

Name Version
Docker 19.03.6
docker-compose 1.17.1

Building image

docker-compose build

This will build the image with tag fastapi-template:latest

Deployment step

The service is deployed with docker-compose.

  1. Start containers
docker-compose up

Contribution

About

Line chatbot implementation, with fastapi framework and using redis as cache.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages