This service is built using FastAPI and provides an API for translating text between different languages. It integrates with the Google Translate API and maintains a database of translation tasks, allowing users to submit text for translation and check the status and results of their requests.
- Translate text between multiple languages using the Google Translate API.
- Maintain a database of translation tasks to track their status and results.
- Asynchronous translation processing with FastAPI for improved performance.
Tried Translations... & UI
- FastAPI: The web framework used to build the API service.
- googletrans: Provides translation capabilities using the Google Translate API.
- SQLAlchemy: ORM used for database operations.
- Jinja2: Templating engine for rendering HTML pages.
- Bootstrap: CSS framework for styling the frontend.
-
Clone the repository:
git clone https://github.com/DarkDk123/Lang-Translation-Service-FastAPI cd Lang-Translation-Service-FastAPI
-
Set up a virtual environment:
python3 -m venv .venv source .venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables: Create a
.env
file and add your database URL. -
Run the FastAPI server:
cd app # go to app directory uvicorn main:app --port 8000
-
Access the service: Open your browser and go to
http://localhost:8000
to use the Language Translator Service.