Skip to content

nchebotov/fastapi_restapi_microservise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fastapi - REST API Microservise

Requirements

Local development

PostgreSQL

Create the file repository configuration:

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

Import the repository signing key:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

Update the package lists:

sudo apt-get update

Install the latest version of PostgreSQL. If you want a specific version, use 'postgresql-14' or similar instead of 'postgresql':

sudo apt-get -y install postgresql-14

Poetry

Install Poetry:

pip install poetry

Create the virtual environment and install dependencies with:

poetry install

See the poetry docs for information on how to add/update dependencies.

Run commands inside the virtual environment with:

poetry run <your_command>

Spawn a shell inside the virtual environment with:

poetry shell

Start a development server locally:

poetry run uvicorn api.main:app --reload --host localhost --port 8000

API will be available at localhost:8000/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages