API for compliance tool
Project description
gap-client
Introduction
This is the official Python client for Gap Solutions APIs.
It is currently in heavy development, and not yet released in full version.
It is implemented as a Pyhton package, and made available on PyPi
Version string is stored in VERSION, and used by make to correctly tag artifacts.
Requirements are managed in requirements.in and compiled to requirements.txt with make req
.
Development
Please note that this project uses a Makefile to manage it. Simply type make
in the project folder for help
Set up environment
- Install GNU make
- Install Python 3.9 or newer
- NOTE: Python for windows is here
- Create virtual environment. (example:
python -m venv ~/my_venv
) - Activate virtual environment. (example:
source ~/my_venv/bin/activate
) - Install requirements for project:
make req
Test
- Run all test:
make test
-- or --
- Go to tests dir:
cd tests
- List available tests:
make
- Chose one test to run:
make gap
NOTE: You can find the source code for the tests here
Build
- Change version string:
nano VERSION
(edit and save the string) - Build project package:
make pypi-build
Deploy
- Make sure
PYPI_TOKEN
environment variable is set (set in pypi.org account) - Push project package to pypi:
make pypi-push
- Verify that the package version is uploaded to https://pypi.org/project/gap-client/
Use
In your project:
- Put
gap_client>=1.0.0
in projectrequirements.txt
(substitute the version number to the latest) - Reload requirements with:
pip install -r requirements.txt
- Import the package with:
from gap_client import Client as gap
- Use the client. This example simply prints a hellp text:
print(gap.hello_gap())
Examples
You can find examples here
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file gap-client-0.1.1.tar.gz
.
File metadata
- Download URL: gap-client-0.1.1.tar.gz
- Upload date:
- Size: 33.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 748b77852cb3c0a2fb236829b898f236dd9b3ed7684055682b8f7f907720f428 |
|
MD5 | 9749ddb91684b407f58f52bc86e8dd02 |
|
BLAKE2b-256 | ffa47cdd40d52a4cdbe8dcd6d3210dbef0d141692fde00c60ef1ff75d88a7c35 |