nyc / client-python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Grafeas

An API to insert and retrieve annotations on cloud artifacts.

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

  • API version: v1alpha1
  • Package version: v1alpha1
  • Build package: io.swagger.codegen.languages.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/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import grafeas 

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 grafeas

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import grafeas
from grafeas.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = grafeas.GrafeasApi()
parent = 'parent_example' # str | 
body = grafeas.ApiNote() # ApiNote | 

try:
    # Creates a new `Note`.
    api_response = api_instance.create_note(parent, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GrafeasApi->create_note: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
GrafeasApi create_note POST /v1alpha1/{parent}/notes Creates a new `Note`.
GrafeasApi create_occurrence POST /v1alpha1/{parent}/occurrences Creates a new `Occurrence`. Use this method to create `Occurrences` for a resource.
GrafeasApi create_operation POST /v1alpha1/{parent}/operations Creates a new `Operation`.
GrafeasApi get_occurrence_note GET /v1alpha1/{name}/notes Gets the `Note` attached to the given `Occurrence`.
GrafeasApi list_note_occurrences GET /v1alpha1/{name}/occurrences Lists `Occurrences` referencing the specified `Note`. Use this method to get all occurrences referencing your `Note` across all your customer projects.
GrafeasApi list_notes GET /v1alpha1/{parent}/notes Lists all `Notes` for a given project.
GrafeasApi list_occurrences GET /v1alpha1/{parent}/occurrences Lists active `Occurrences` for a given project matching the filters.
GrafeasApi update_note PATCH /v1alpha1/{name} Updates an existing `Note`.
GrafeasProjectsApi create_project POST /v1alpha1/projects Creates a new `Project`.
GrafeasProjectsApi delete_project DELETE /v1alpha1/{name} Deletes the given `Project` from the system.
GrafeasProjectsApi get_project GET /v1alpha1/{name} Returns the requested `Project`.
GrafeasProjectsApi list_projects GET /v1alpha1/projects Lists `Projects`

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

About

License:Apache License 2.0


Languages

Language:Python 99.7%Language:Shell 0.3%