Python lib for interacting with an instance of the Tapis API Framework
Project description
tapipy - Tapis V3 Python SDK
Python library for interacting with an instance of the Tapis API Framework.
Development
This project is under active development, exploring different approaches to SDK generation.
Installation
pip install tapipy
Running the tests
Tests resources are contained within the test
directory. Dockerfile-tests
is at root.
- Build the test docker image:
docker build -t tapis/tapipy-tests -f Dockerfile-tests .
- Run these tests using the built docker image:
docker run -it --rm tapis/tapipy-tests
Usage
TODO - provide working examples, e.g.,
import tapipy
t = tapipy.Tapis(base_url='http://localhost:5001')
req = t.tokens.NewTokenRequest(token_type='service', token_tenant_id='dev', token_username='admin')
t.tokens.create_token(req)
import openapi_client
configuration = openapi_client.Configuration()
configuration.host = 'http://localhost:5001'
api_instance = openapi_client.TokensApi(openapi_client.ApiClient(configuration))
new_token = openapi_client.NewTokenRequest(token_type='service', token_tenant_id='dev', token_username='admin')
resp = api_instance.create_token(new_token)
jwt = resp.get('result').get('access_token').get('access_token')
Build instructions
Building is done with poetry as follows:
pip install poetry
poetry install
This installs tapipy
to a virtual environment. Run a shell in this environment with:
poetry shell
To install locally (not in a virtual environment):
pip install poetry
poetry build
cd dists
pip install *.whl
PyPi Push Instructions
poetry build
poetry publish
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
tapipy-0.2.2.tar.gz
(40.6 kB
view details)
Built Distribution
tapipy-0.2.2-py3-none-any.whl
(45.5 kB
view details)
File details
Details for the file tapipy-0.2.2.tar.gz
.
File metadata
- Download URL: tapipy-0.2.2.tar.gz
- Upload date:
- Size: 40.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.9 CPython/3.6.9 Linux/4.19.84-microsoft-standard
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46648ed5c40fac1b2adfe2732097ed3fbd6345ce265cdfcd35a16bb16ba44c7a |
|
MD5 | 17908a036180c35a8ae823e27d872c6d |
|
BLAKE2b-256 | ed58793baedab5df11ca0d01746ffd9b5fcb5da831d54e1c1eab5a1b0c4919aa |
File details
Details for the file tapipy-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: tapipy-0.2.2-py3-none-any.whl
- Upload date:
- Size: 45.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.9 CPython/3.6.9 Linux/4.19.84-microsoft-standard
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a6e1ac66fd803c67852c683e6942750a0515b9b844db10e52615ca1658ad457 |
|
MD5 | 6dcc426a0af4957a72383c8ccccbc094 |
|
BLAKE2b-256 | 41c1a170fc11d9082689febb6cce1fede44d034bb162f550189fdc569040e9e9 |