Updates the requirements on [flask](https://github.com/pallets/flask) to permit the latest version. - [Release notes](https://github.com/pallets/flask/releases) - [Changelog](https://github.com/pallets/flask/blob/main/CHANGES.rst) - [Commits](https://github.com/pallets/flask/compare/2.0.3...2.1.0) --- updated-dependencies: - dependency-name: flask dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> |
||
---|---|---|
.. | ||
deploy | ||
.env.example | ||
api_blueprint_keyword.py | ||
api_blueprint_portfolio.py | ||
api_blueprint_shares.py | ||
api_blueprint_telegram.py | ||
api_blueprint_transactions.py | ||
api_blueprint_user.py | ||
app.py | ||
auth.py | ||
config.py | ||
db.py | ||
Dockerfile | ||
helper_functions.py | ||
models.py | ||
README.md | ||
requirements.txt | ||
schema.py |
API
Aktienbot API
Development
- Create virtual environment
python -m venv venv env/Scripts/activate
- Install requirements
pip install -r api/requirements.txt
- Set environment variables (see list below)
- Use
.env
-file inapi
directory like.env.example
- Or set variables using
export
orset
commands. (Windowsset
, Linuxexport
)
- Use
- 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>