This project has been archived by its maintainers, and is no longer receiving any updates.
HESPERIDES CLI
Python 3 lib & CLI (Command Line Interface) for Hesperides
A changelog is available here: CHANGELOG.md
Installation
hesperides-cli is published on Pypi. It can be installed simply with pip:
pip install hesperides-cli
Developper environment installation
After cloning this repo and optionally creating a virtualenv:
pip install -e .
Releasing a new version
With a valid ~/.pypirc:
- update
CHANGELOG.md - bump version in
hesperidescli/hesperidescli.py&git commit&git push python setup.py sdisttwine upload dist/*- perform a release on GitGub, including the description added to
CHANGELOG.md
Usage
hesperides [OPTIONS] COMMAND [ARGS]
To get all hesperides commands, just type:
hesperides
Configure
This client configuration is stored locally in ~/.hesperides/:
To set up your environment and create a local user profile by answering to a few questions:
hesperides set-conf [PROFILE_NAME]
If you have multiple profiles, you can switch between them with:
hesperides use-profile [PROFILE_NAME]
To try your configuration, type one of these commands:
hesperides get-versions
hesperides get-user
Usage with Docker
You can using the following Dockerfile as a starting point:
FROM python:3
RUN pip install hesperides-cli
ARG USERNAME
ARG PASSWORD
RUN hesperides set-conf --username $USERNAME --password $PASSWORD --hesperides-endpoint https://hesperides.example --ignore-ssl-warnings
ENTRYPOINT ["hesperides"]
The resulting Docker image will contain some secret credentials, which is not a good practice, but makes it really easy to use for demos:
docker build --build-arg USERNAME=... --build-arg PASSWORD=... -t hesperides-cli .
docker run --rm hesperides-cli get-versions
If your goal is instead to generate files in your Docker image at startup time,
you can start by putting something like this in your ENTRYPOINT:
hesperides write-files --app $APP --ptf $PTF
Exporting properties as environment variables
For this use case, you can use get-properties --export.
Here is an example of usage, that could be included in a Gitlab CD/CI step for instance:
tmp_file=$(mktemp) && hesperides get-properties --app APP --ptf PTF --path '#ROOT#test-module#1.1#WORKINGCOPY' --export > $tmp_file && source $tmp_file && rm $tmp_file
Local files generation with zero calls to the backend API
Warning for Windows bash users
When using this tool with a Python version installed through Windows,
in combination with a Linux-like shell environment (e.g. Git Bash),
the files generated by write-files may not be written were you expect,
because your Python executable will interpret Unix path like /var/tmp as relative to your current drive (C:, D:...).
In this situation, use this command to find out where is the location of your root (/) for Python:
python -c 'import os; os.chdir("/"); print(os.getcwd())'
Metadata
Release files for hesperides-cli 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hesperides-cli-0.5.1.tar.gz | 22.0 kB | Without provenance | Details for hesperides-cli-0.5.1.tar.gz |
Release files / hesperides-cli-0.5.1.tar.gz
| Download URL | hesperides-cli-0.5.1.tar.gz |
|---|---|
| Size | 22.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e92e3a6ac97ef75df3e8d09fdae8058faa9a1f1b010ee0352f24d43b06c3ae7
|
|
BLAKE2b-256 checksum How to use checksums |
0d9c769d6f4f43f08f923e208b138615cf24cd926eee10cea072b5df74424803
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.7
|
Security for hesperides-cli 0.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.