Skip to content

mattcjo/account-similarity-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI Account Similarity API

Overview

This FastAPI application provides an API for finding similar accounts based on hashtag usage and account screen names.

Prerequisites

# Python (version 3.9 recommended)
[Install Python](https://www.python.org/)

# Poetry for managing dependencies
pip install poetry

# Docker for containerization
[Install Docker](https://www.docker.com/)

Standalone Installation and Run

# Clone the repository
git clone <repository-url>
cd <repository-directory>

# Install dependencies using Poetry
poetry install

# Run the FastAPI app
poetry run uvicorn src.main:app --host 0.0.0.0 --port 8000

The app will be accessible at http://localhost:8000.

Containerized Deployment

# Build the Docker image
docker build -t account-similarity-api .

# Run the Docker container
docker run -p 8000:8000 account-similarity-api

The app will be accessible at http://localhost:8000.

Run Tests

# Use poetry and pytest
poetry run pytest tests/test_api.py

Cleanup

# To stop the standalone FastAPI app, press Ctrl + C.
# To stop and remove the Docker container
docker ps  # Find the CONTAINER_ID
docker stop CONTAINER_ID

About

Account Similarity API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published