Code Monkey home page Code Monkey logo

topshelfre's Introduction

TopShelfRE Take Home Assessment - Tejan Kahlon

Hello! I'm Tejan Kahlon and here is my submission for the TopShelfRE coding assignment. I used Python with FastAPI, added full functionality to the API endpoints, and included testing. The server code and tests are combined in test_and_app.py. The application is also containerized using Docker.

Setup Instructions

Clone the Repo and Install Dependencies

  1. Clone the repository: git clone https://github.com/yourusername/topshelfre.git cd topshelfre

  1. Install dependencies:

pip install -r requirements.txt

Running the Application

  1. Start the FastAPI server: uvicorn test_and_app:app --reload

  2. Access the application: Open your browser and go to http://127.0.0.1:8000

Running Tests

pytest

Running in Docker

Build and Run Docker Container

  1. Ensure Docker is installed: Download and install Docker from Docker's official site.

  2. Build the Docker image: docker build -t myfastapiapp .

  3. Run the Docker container: docker run -d -p 8000:8000 myfastapiapp

  4. Access the application: Open your browser and go to http://127.0.0.1:8000

Dockerfile Used

Use the Python image

FROM python:3.9-slim

Set the working directory inside the container

WORKDIR /app

Copy the requirements file and install dependencies

COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt

Copt the rest of the application code to the container

COPY . .

Command to run the FASTAPI server

CMD ["uvicorn", "test_and_app:app", "--host", "0.0.0.0", "--port", "8000"]

topshelfre's People

Contributors

tejankahlon avatar varunturlapati avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.