Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

Repository files navigation

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

To install the package from this repository:

pip3 install git+https://github.com/grafeas/client-python.git#egg=Grafeas --user

Then import the package:

importgrafeas

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:

importgrafeas

Getting Started

Please follow the installation procedure and then run the following:

from __future__ importprint_functionimporttimeimportgrafeasfromgrafeas.restimportApiExceptionfrompprintimportpprint# create an instance of the API classapi_instance=grafeas.GrafeasApi(grafeas.ApiClient(configuration))
parent='parent_example'# str | This field contains the project Id for example: \"project/{project_id}body=grafeas.ApiNote() # ApiNote | The Note to be insertedtry:
# Creates a new `Note`.api_response=api_instance.create_note(parent, body)
pprint(api_response)
exceptApiExceptionase:
print("Exception when calling GrafeasApi->create_note: %s\n"%e)

Documentation for API Endpoints

All URIs are relative to http://localhost

ClassMethodHTTP requestDescription
GrafeasApicreate_notePOST /v1alpha1/{parent=projects/*}/notesCreates a new `Note`.
GrafeasApicreate_occurrencePOST /v1alpha1/{parent=projects/*}/occurrencesCreates a new `Occurrence`. Use this method to create `Occurrences` for a resource.
GrafeasApicreate_operationPOST /v1alpha1/{parent=projects/*}/operationsCreates a new `Operation`.
GrafeasApidelete_noteDELETE /v1alpha1/{name=projects//notes/}Deletes the given `Note` from the system.
GrafeasApidelete_occurrenceDELETE /v1alpha1/{name=projects//occurrences/}Deletes the given `Occurrence` from the system. Use this when an `Occurrence` is no longer applicable for the given resource.
GrafeasApiget_noteGET /v1alpha1/{name=projects//notes/}Returns the requested `Note`.
GrafeasApiget_occurrenceGET /v1alpha1/{name=projects//occurrences/}Returns the requested `Occurrence`.
GrafeasApiget_occurrence_noteGET /v1alpha1/{name=projects//occurrences/}/notesGets the `Note` attached to the given `Occurrence`.
GrafeasApilist_note_occurrencesGET /v1alpha1/{name=projects//notes/}/occurrencesLists `Occurrences` referencing the specified `Note`. Use this method to get all occurrences referencing your `Note` across all your customer projects.
GrafeasApilist_notesGET /v1alpha1/{parent=projects/*}/notesLists all `Notes` for a given project.
GrafeasApilist_occurrencesGET /v1alpha1/{parent=projects/*}/occurrencesLists active `Occurrences` for a given project matching the filters.
GrafeasApiupdate_notePATCH /v1alpha1/{name=projects//notes/}Updates an existing `Note`.
GrafeasApiupdate_occurrencePATCH /v1alpha1/{name=projects//occurrences/}Updates an existing occurrence.
GrafeasApiupdate_operationPATCH /v1alpha1/{name=projects//operations/}Updates an existing operation returns an error if operation does not exist. The only valid operations are to update mark the done bit change the result.
GrafeasProjectsApicreate_projectPOST /v1alpha1/projectsCreates a new project.
GrafeasProjectsApidelete_projectDELETE /v1alpha1/{name=projects/*}Deletes the specified project.
GrafeasProjectsApiget_projectGET /v1alpha1/{name=projects/*}Gets the specified project.
GrafeasProjectsApilist_projectsGET /v1alpha1/projectsLists projects.

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

9 watching

Forks

Releases

Packages

Used by

Contributors

Languages