https://github.com/iyazerski/news_classifier
RESTful API and background worker for news classification
https://github.com/iyazerski/news_classifier
docker fastapi nlp rest-api
Last synced: 2 months ago
JSON representation
RESTful API and background worker for news classification
- Host: GitHub
- URL: https://github.com/iyazerski/news_classifier
- Owner: iyazerski
- License: gpl-3.0
- Created: 2022-10-14T10:55:41.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-16T20:26:27.000Z (over 3 years ago)
- Last Synced: 2025-12-31T22:43:22.144Z (6 months ago)
- Topics: docker, fastapi, nlp, rest-api
- Language: Python
- Homepage: https://newsclassifier.iyazerski.me
- Size: 50.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: news_classifier/__init__.py
- License: LICENSE
Awesome Lists containing this project
README
# news_classifier
## Requirements
- [python](https://www.python.org/downloads/)
- [docker](https://docs.docker.com/get-docker/)
- [docker-compose](https://docs.docker.com/compose/install/)
- [pydeployhelp](https://pypi.org/project/pydeployhelp/)
## Quickstart
Create `.env` file in project root with following content (replace example values to real):
```text
# common
PROJECT_SLUG=news_classifier
ENV=dev
COMMUNICATOR_REPLICAS_NUM=1
WORKER_REPLICAS_NUM=1
VOLUMES_ROOT=/home/user/news_classifier
# communicator
PORT=8080
DNS=some_dns.com
# db
DB_HOST=localhost
DB_PORT=27017
DB_USERNAME=user
DB_PASSWORD=password
# broker
BROKER_HOST=localhost
BROKER_PORT=5672
BROKER_USERNAME=user
BROKER_PASSWORD=password
```
Run\build\stop all\any services:
```console
user@host:~/news_classifier$ pydeployhelp
```
## Development
To run project in development mode you need to install requirements:
```console
user@host:~/news_classifier$ python -m venv venv && source venv/bin/activate
(venv) user@host:~/news_classifier$ pip install -r requirements/dev.txt
```
And then install package in dev mode:
```console
(venv) user@host:~/news_classifier$ python setup.py develop
```