Updates the requirements on [faker](https://github.com/joke2k/faker) to permit the latest version. - [Release notes](https://github.com/joke2k/faker/releases) - [Changelog](https://github.com/joke2k/faker/blob/master/CHANGELOG.md) - [Commits](https://github.com/joke2k/faker/compare/v13.7.0...v13.11.0) --- updated-dependencies: - dependency-name: faker dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> |
||
---|---|---|
.. | ||
app | ||
deploy | ||
tests | ||
.env.example | ||
app.py | ||
Dockerfile | ||
generate_sample_transactions.py | ||
load_share_price.py | ||
README.md | ||
requirements.txt |
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
Testing
- 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
- Change directory:
cd api/
- 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>