This project is designed to handle various backend operations including parsing, logging, and interacting with social media platforms. It is built using FastAPI and includes several utilities for handling files, making HTTP requests, and processing data.
- Python 3.10
- Docker
- Docker Compose
-
Clone the repository:
git clone <repository-url> cd <repository-directory>
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r backend/requirements.txt
-
Set up environment variables:
cp backend/.env.local.example backend/.env.local # Edit backend/.env.local with your configuration
-
Start the backend server:
uvicorn backend.main:app --host 0.0.0.0 --port 7899 --reload
-
Alternatively, canyou use Docker Compose:
docker-compose -f deploy/docker-compose.yaml up --build
- Submit File:
POST /submit/file - Get CSV Template:
GET /template/csv - Get XLSX Template:
GET /template/xlsx
curl -X POST "http://localhost:7899/submit/file" \
-H "accept: application/json" \
-H "Content-Type: multipart/form-data" \
-F "links_file=@path/to/your/file.csv"The project uses loguru for logging. Logs are written to app.log and also output to stderr.
- Fork the repository.
- Create a new branch (git checkout -b feature-branch).
- Make your changes.
- Commit your changes (git commit -am 'Add new feature').
- Push to the branch (git push origin feature-branch).
- Create a new Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.