TelegramAktienBot/api
dependabot[bot] d1869cc883
Bump bcrypt from 3.1.0 to 3.2.0 in /api
Bumps [bcrypt](https://github.com/pyca/bcrypt) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/pyca/bcrypt/releases)
- [Changelog](https://github.com/pyca/bcrypt/blob/main/release.py)
- [Commits](https://github.com/pyca/bcrypt/compare/3.1.0...3.2.0)

---
updated-dependencies:
- dependency-name: bcrypt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-27 18:46:58 +00:00
..
deploy Extracted frontend from webservice to new directory 2022-03-17 17:11:00 +01:00
.env.example Updated README files, .gitignore and .env.example 2022-03-17 23:49:39 +01:00
api_blueprint_keyword.py Changed database model 2022-03-27 17:23:33 +02:00
api_blueprint_portfolio.py Fixed imports #2 2022-03-27 18:19:51 +02:00
api_blueprint_shares.py Changed database model 2022-03-27 17:23:33 +02:00
api_blueprint_telegram.py Added endpoint to set telegram user id 2022-03-27 17:24:26 +02:00
api_blueprint_transactions.py Changed database model 2022-03-27 17:23:33 +02:00
api_blueprint_user.py Changed database model 2022-03-27 17:23:33 +02:00
app.py Fixed imports 2022-03-27 18:16:45 +02:00
auth.py Improved try-excepts 2022-03-27 20:03:11 +02:00
config.py Standardization of json responses 2022-03-22 11:21:39 +01:00
db.py Extracted frontend from webservice to new directory 2022-03-17 17:11:00 +01:00
Dockerfile Extracted frontend from webservice to new directory 2022-03-17 17:11:00 +01:00
helper_functions.py Updated api to use bcrypt 2022-03-27 20:42:11 +02:00
models.py Updated api to use bcrypt 2022-03-27 20:42:11 +02:00
README.md Updated README files, .gitignore and .env.example 2022-03-17 23:49:39 +01:00
requirements.txt Bump bcrypt from 3.1.0 to 3.2.0 in /api 2022-03-27 18:46:58 +00:00
schema.py Updated schema.py 2022-03-27 20:12:45 +02:00

API

Aktienbot API

Development

  1. Create virtual environment python -m venv venv env/Scripts/activate
  2. Install requirements pip install -r api/requirements.txt
  3. Set environment variables (see list below)
    1. Use .env-file in api directory like .env.example
    2. Or set variables using export or set commands. (Windows set, Linux export)
  4. Run api python api/app.py

Environment variables

    # Flask secret key
    SECRET_KEY=
    
    # MYSQL Connection
    MYSQL_USER=
    MYSQL_PASSWORD=
    MYSQL_HOST=
    MYSQL_PORT=
    MYSQL_DATABASE=

Docker

docker run -d \
    --name aktienbot_api \
    --hostname aktienbot_api \
    --publish 80:80 \
    --env "SECRET_KEY=" \
    --env "MYSQL_USER=" \
    --env "MYSQL_PASSWORD=" \
    --env "MYSQL_HOST=" \
    --env "MYSQL_PORT=" \
    --env "MYSQL_DATABASE=" \
    --restart unless-stopped \
    registry.flokaiser.com/aktienbot/api:latest

or load environment variables from file by using --env-file <filename>