Python API for the T.A.R.A.L.L.O. Inventory System
Create a python3 virtual environment
python3 -m venv venv
or using virtualenv
virtualenv -p python3 venv
Create a file named .env
(a dot followed by the word "env") with this content:
export TARALLO_URL=http://127.0.0.1:8080
export TARALLO_TOKEN=yoLeCHmEhNNseN0BlG0s3A:ksfPYziGg7ebj0goT0Zc7pbmQEIYvZpRTIkwuscAM_k
Or, as an alternative, you can add these lines to PyCharm (or whatever other IDE you're using) configuration for the test script launcher, they are just environment variables.
The token is the default one for the dev enviroment (see T.A.R.A.L.L.O. developement, but you can generate different ones from T.A.R.A.L.L.O. obviously.
Then activate the virtualenv:
source venv/bin/activate
Install dependencies for developement
pip install -e ".[dev]"
or for production only
pip install -e .
To run tests type
nosetests -v
You may also get pytarallo through PyPI by using the command pip install pytarallo
⚠️ Wait for the automatic tests that run after pushing a new commit to complete succesfully before releasing a broken library on PyPI.
git clone https://github.com/WEEE-Open/pytarallo && cd pytarallo
version
and download_url
.
vim setup.py
source venv/bin/activate
pip install setuptools wheel twine
rm dist/*
python setup.py sdist bdist_wheel
Upload the output packages to PyPI:
twine upload dist/*
This last step requires: