Skip to content
This repository has been archived by the owner on Aug 26, 2023. It is now read-only.

peridotbuild/rekor-python-sdk

Repository files navigation

rekor-python-sdk

Rekor is a cryptographically secure, immutable transparency log for signed software releases.

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/peridotbuild/rekor-python-sdk.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/peridotbuild/rekor-python-sdk.git)

Then import the package:

import rekor_sdk 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import rekor_sdk

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import rekor_sdk
from rekor_sdk.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = rekor_sdk.EntriesApi(rekor_sdk.ApiClient(configuration))
body = rekor_sdk.ProposedEntry() # ProposedEntry | 

try:
    # Creates an entry in the transparency log
    api_response = api_instance.create_log_entry(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EntriesApi->create_log_entry: %s\n" % e)

# create an instance of the API class
api_instance = rekor_sdk.EntriesApi(rekor_sdk.ApiClient(configuration))
log_index = 56 # int | specifies the index of the entry in the transparency log to be retrieved

try:
    # Retrieves an entry and inclusion proof from the transparency log (if it exists) by index
    api_response = api_instance.get_log_entry_by_index(log_index)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EntriesApi->get_log_entry_by_index: %s\n" % e)

# create an instance of the API class
api_instance = rekor_sdk.EntriesApi(rekor_sdk.ApiClient(configuration))
entry_uuid = 'entry_uuid_example' # str | the UUID of the entry for which the inclusion proof information should be returned

try:
    # Get log entry and information required to generate an inclusion proof for the entry in the transparency log
    api_response = api_instance.get_log_entry_by_uuid(entry_uuid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EntriesApi->get_log_entry_by_uuid: %s\n" % e)

# create an instance of the API class
api_instance = rekor_sdk.EntriesApi(rekor_sdk.ApiClient(configuration))
body = rekor_sdk.SearchLogQuery() # SearchLogQuery | 

try:
    # Searches transparency log for one or more log entries
    api_response = api_instance.search_log_query(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EntriesApi->search_log_query: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://rekor.sigstore.dev/

Class Method HTTP request Description
EntriesApi create_log_entry POST /api/v1/log/entries Creates an entry in the transparency log
EntriesApi get_log_entry_by_index GET /api/v1/log/entries Retrieves an entry and inclusion proof from the transparency log (if it exists) by index
EntriesApi get_log_entry_by_uuid GET /api/v1/log/entries/{entryUUID} Get log entry and information required to generate an inclusion proof for the entry in the transparency log
EntriesApi search_log_query POST /api/v1/log/entries/retrieve Searches transparency log for one or more log entries
IndexApi search_index POST /api/v1/index/retrieve Searches index by entry metadata
PubkeyApi get_public_key GET /api/v1/log/publicKey Retrieve the public key that can be used to validate the signed tree head
TlogApi get_log_info GET /api/v1/log Get information about the current state of the transparency log
TlogApi get_log_proof GET /api/v1/log/proof Get information required to generate a consistency proof for the transparency log

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

About

Auto generated Python SDK for Rekor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages