TelegramAktienBot/api
dependabot[bot] 1f8c4494fe
Bump bcrypt from 3.2.2 to 4.0.0 in /api
Bumps [bcrypt](https://github.com/pyca/bcrypt) from 3.2.2 to 4.0.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.2.2...4.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-24 09:32:57 +00:00
..
app Sort transactions #2 2022-05-12 18:19:00 +02:00
deploy Changed some file to test pipeline execution 2022-04-04 16:08:08 +02:00
tests Reformatting 2022-05-11 23:33:48 +02:00
.env.example Save symbol price in database 2022-04-05 15:08:57 +02:00
app.py Added file headers 2022-04-12 09:50:24 +02:00
Dockerfile Updated Dockerfile 2022-04-05 19:08:09 +02:00
generate_sample_transactions.py Removed code 2022-04-12 12:16:25 +02:00
load_share_price.py Updated load_share_price.py 2022-05-09 14:22:17 +02:00
README.md Reformatting 2022-05-11 23:33:48 +02:00
requirements.txt Bump bcrypt from 3.2.2 to 4.0.0 in /api 2022-08-24 09:32:57 +00: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

Testing

  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. Change directory: cd api/
  5. Run tests: python -m pytest -v --cov-report term-missing --cov=app

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>