GithubHelp home page GithubHelp logo

backend-developer-test's Introduction

Backend Developer Test

This project is a template for a FastAPI application with a MySQL database, using Uvicorn as the ASGI server, Alembic for database migrations, and Redis for caching or background tasks.

Prerequisites

Before you start, ensure you have the following installed:

  • Python 3.8+
  • MySQL database
  • Redis server
  • pip (Python package installer)

Getting Started

Follow these steps to get the application up and running.

1. Clone the Repository

git clone https://github.com/pndiku/backend-developer-test.git
cd backend-developer-test

2. Set Up the Virtual Environment

Create a virtual environment and activate it:

python -m venv venv
source venv/bin/activate  # On Windows, use `venv\Scripts\activate`

3. Install Dependencies

Install the required Python packages:

pip install -r requirements.txt

4. Configure the Environment Variables

Create a .env file in the project root directory and add the following environment variables:

DATABASE_URL=mysql+pymysql://backend:backend@localhost/backend_db
REDIS_URL=redis://localhost:6379/0

5. Set Up the Database

Ensure your MySQL server is running. Then, initialize the database using Alembic:

alembic upgrade head

6. Running the Application

Start the Uvicorn server to run your FastAPI application:

uvicorn app.main:app --reload

This command will start the server at http://127.0.0.1:8000.

License

This project is licensed under the MIT License. See the LICENSE file for details.

backend-developer-test's People

Contributors

pndiku avatar

Watchers

 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.