Giter VIP home page Giter VIP logo

movietracker_fastapi's Introduction

FastAPI бэкенд сервиса по трекингу фильмов

Запуск проекта

  1. Разверните БД PostgreSQL (локально или докер-контейнер)

  2. Склонируйте проект

    git clone https://github.com/kirillov-n/movietracker_FastAPI.git
    
  3. Добавьте переменную окружения

    set PYTHONPATH=ССЫЛКА_НА_ПРОЕКТ
    
  4. Создайте в корне проекта .env файл (рядом с requirements.txt) и замените значения на свои:

    # Переменные, связанные с БД
    DB_HOST='localhost'
    DB_PORT=5432
    DB_USER=<ИМЯ_ПОЛЬЗОВАТЕЛЯ>
    DB_PASS=<ПАРОЛЬ>
    DB_NAME=<НАЗВАНИЕ_БД>
    
    # Секретный ключ.
    SECRET=<СЕКРЕТНЫЙ_КЛЮЧ>
    
  5. Создайте и активируйте виртуальное окружение:

    python -m venv venv
    venv\Scripts\activate.bat
    
  6. Установите зависимости

    pip install -r requirements.txt
    
  7. Запустите сервис:

    python ./src/main.py
    
  8. Наполните таблицу films фильмами:

    python ./src/data/populate_films.py
    
  9. Сервис доступен по адресу:

    http://localhost:8000
    
  10. Если вам нужен другой адрес вы можете изменить его в main файле или запустить сервис командой (изменив значения):

    uvicorn src.app.app:app --host 127.0.0.1 --port 8000 --reload
    

movietracker_fastapi's People

Contributors

kirillov-n 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.