Most files in the project are autogenerated by swagger-codegen with urllib3
library for python (default).
- template - folder contains redefined templates of
swagger-codegen
. Original templates you can find in swagger-codegen repo. - docs - generated documentation for models and API Client.
- fingerprint_pro_server_api_sdk - API Client code is generated automatically.
You need swagger-codegen
to run code generation. There are many ways described in the readme.
In the project we use local jar file swagger-codegen-cli.jar
.
You can just run ./generate.sh
script and it will do all the work.
To download fresh OpenAPI schema run ./sync.sh
Project configuration is described in config.json
file. To read about available parameters run the command below:
java -jar ./bin/swagger-codegen-cli.jar config-help -l python
To make requests using the local source code of the SDK:
- Define your Secret API key, Visitor ID, Request ID and Region by creating a
.env
file at the root of the repository. (See example)) - Run the following commands:
pip install -r requirements.txt
python run_checks.py
You need to install python
and pip
.
Then you can run:
pip install -r requirements.txt
pip install -r test-requirements.txt
pytest
The library is automatically released and published to PyPi on every push to the main branch if there are relevant changes using semantic-release with following plugins:
- @semantic-release/commit-analyzer
- @semantic-release/release-notes-generator
- @semantic-release/changelog
- @semantic-release/exec
- semantic-release-pypi
- @semantic-release/github
The workflow must be approved by one of the maintainers, first.
Pre-release will be created after merging pr to the dev
branch and running the release
workflow.
Python uses PEP 440 for versions format, so we convert a pre-release version from semver to PEP 440 in the ./generate.sh
.