docker-compose up --build
- BELINSKY_SECRET_KEY (default: secrets.token_hex(16)) - App's secret key.
- BELINSKY_PORT (default: 4958) - Port to forward belinsky on.
- BELINSKY_GOOGLE_CLOUD_CREDENTIALS (default: None) - Json string containing the GCP service credentials. Required for "text_analyzer" module.
- BELINSKY_GUNICORN_CONFIG (default: gunicorn_config.py) - Path to Gunicorn config file.
- BELINSKY_NUM_WORKERS (default: 4) - Number of worker processes for handling requests.
- BELINSKY_NUM_THREADS (default: 1) - Number of threads.
- NB! The suggested maximum number of workers*threads is (2*CPU)+1
- BELINSKY_WORKER_CLASS (default: sync) - Type of workers to use.
- BELINSKY_NUM_WORKER_CONNECTIONS (default: 1000) - Maximum number of simultaneous clients.
docker-compose -f docker-compose.observability.yaml up --build
- BELINSKY_OBSERVABILITY_PORT (default: 4800) - Port to forward Grafana on.
docker-compose -f docker-compose.test.yaml up --build --abort-on-container-exit
You can add raw=true to any request body to receive response as json instead of web page.
- username: Username.
- password: Password.
Request
curl -X POST $BELINSKY_URL/signup \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=your_username&password=your_password"
- username: Username.
- password: Password.
Request
curl -X POST $BELINSKY_URL/login \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=your_username&password=your_password"
Request
curl $BELINSKY_URL/logout
- username (str): Username.
- password (str): Password.
Request
curl \
--header "Content-Type: application/json" \
--data '{"username": "your_username", "password": "your_password"}' \
$BELINSKY_URL/delete-user
Response
{
"result": "Successfully deleted your_username user",
"status": 200
}
Request
curl $BELINSKY_URL/delete-user
Response
{
"error": "json body not found in request",
"status": 400
}
Request
curl \
--header "Content-Type: application/json" \
--data '{"username": "your_username"}' \
$BELINSKY_URL/delete-user
Response
{
"error": "Not enough keys in request. Required keys: username, password",
"status": 400
}
Request
curl \
--header "Content-Type: application/json" \
--data '{"username": "not_your_username", "password": "your_password"}' \
$BELINSKY_URL/delete-user
Response
{
"result": "User with not_your_username username not found. Please signup first",
"status": 406
}
Request
curl \
--header "Content-Type: application/json" \
--data '{"username": "your_username", "password": "not_your_password"}' \
$BELINSKY_URL/delete-user
Response
{
"result": "Invalid password. Please try again.",
"status": 406
}
- text: Text to be processed.
- phrases: Phrases to be found.
- language [Optional]: Language. If not provided, will be determined automatically.
Request
curl -X POST $BELINSKY_URL/phrase-finder \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "text='мама по-любому любит banan'&phrases=банан"