Commit 7db21ddf authored by Kavindu Randika's avatar Kavindu Randika

initialize server

parent 41b0031d
**/__pycache__/**
env
\ No newline at end of file
# Skin disease Server
### Project setup and configurations
- install python 3.8 (with PIP)
- install following dependencies
`pip install virtualenv`<br/>
`python -m venv env`<br/>
`.\env\Scripts\activate`<br/>
`pip install -r requirements.txt`
## run Server
- .\env\Scripts\activate
- uvicorn index:app --reload
## Export Dependencies
- .\env\Scripts\activate
- pip freeze > requirements.txt
\ No newline at end of file
from pymongo import MongoClient
conn = MongoClient("mongodb+srv://skin-disease:skindis123@cluster0.bv8ia.mongodb.net/myFirstDatabase?retryWrites=true&w=majority")
#mongodb+srv://skin-disease:skindis123@cluster0.bv8ia.mongodb.net/test
\ No newline at end of file
from fastapi import FastAPI
app = FastAPI()
from pydantic import BaseModel
class IsAvailable(BaseModel):
day: str
availability: str
\ No newline at end of file
from pydantic import BaseModel
from typing import List
from models.isAvailable import IsAvailable
class Doctor(BaseModel):
name: str
phone: str
IsAvailable: List[IsAvailable]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment