https://github.com/alina1412/search_app
Educational FastApi project with elasticsearch
https://github.com/alina1412/search_app
alembic asyncio docker-compose elasticsearch fastapi poetry postgres pytest python sqlalchemy
Last synced: 3 months ago
JSON representation
Educational FastApi project with elasticsearch
- Host: GitHub
- URL: https://github.com/alina1412/search_app
- Owner: alina1412
- Created: 2022-11-18T04:44:03.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-12T08:53:18.000Z (over 3 years ago)
- Last Synced: 2025-10-05T22:29:36.171Z (9 months ago)
- Topics: alembic, asyncio, docker-compose, elasticsearch, fastapi, poetry, postgres, pytest, python, sqlalchemy
- Language: Python
- Homepage:
- Size: 142 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# search_app
Educational FastApi project with elasticsearch
# how to use: will be written soon...
## How to run locally
- put variables into .env (as well as elastic credentials)
- create virtual environment:
>... if using poetry
> - poety install
> - poetry shell
>... if using venv
> - python -m venv .venv
> - activate virtual environment
> - pip install -r requirenments.txt
- `make build`: builds docker containers, runs it and runs migrations
> first separated scripts:
1. fill_db_from_csv.py
2. first_fill_index.py
(for the *task* it fills db with
initial data of a given structure from csv doc, and then creates and fills index from initial db data)
if to run a FastApi app locally: - `make run` (but it can be ran in docker)
## Tools
- elasticsearch
- postgres
- alembic
- sqlalchemy
- asyncio
- docker-compose
- makefile
- poetry
- pytest
# The Task branch
- the app has two handlers:
- for searching the match of a query with messages in elastic
- for deleting document from db and elastic by id

# The develop draft branch
- has a separated handlers for creating index in elastic, deleting it, showing all data (for debugging purposes)
