A fastAPI chatting app is a digital platform or application that enables users to communicate with each other through written text messages. These apps provide a user-friendly interface that allows individuals to chat one-on-one or in groups with other users in real-time.
Steps:
- Clone this project in local
- Create virtual env
- Install all the requirements from requirements.txt using below command in virtual env pip install -r requirements.txt
- Replace the SECRET_KEY in config.py. Use the below command to generate the secret key openssl rand -hex 32
- Use the database of your choice. I have provided SQLALCHEMY_DATABASE_URL for MySql and sqlite db. In case you want to use MySql, replace username and password. In case of sqlite, no username and password required. You can make changes in db_handler.py file.
To run functinal test cases. Follow Steps:
- Open terminal
- Go to project directory
- Activate virtual env using command : . {virtual_env_name}/bin/activate
- use pytest command to run functional test cases.
- Open terminal
- Go to project directory
- Activate virtual env using command : . {virtual_env_name}/bin/activate
- Run python main.py to start server
- Goto http://127.0.0.1:8000/docs to open swaggerUI and play with your chat application
A admin username and password added to database by default
username: admin
password: admin
Authorize using the above credentials and use different endpoints to create, delete, add [users,groups,message,likes]
Click on Authorize
Enter admin credentials
You are Authorize to access endpoints
Close the current pop up window, and access different endpoints!
Note: Create, edit user endpoints are only accessible to admin only
And all other api such as create, delete [groups,message] etc are accessible only to normal user, so create a new user
and then use these endpoints
Login,token are common to admin and normal user
Information about the project's license, including any restrictions or permissions for use
Instructions for how to get in touch with the project's maintainers or developers