Registry / gcp / grafeas

grafeas

JSON →
library1.23.0pypypi✓ verified 79d ago

Grafeas is an implementation of the Grafeas API, which stores and enables querying and retrieval of critical metadata about all of your software artifacts. This Python client library is part of the actively maintained `google-cloud-python` monorepo, receiving regular updates for features, bug fixes, and compatibility, ensuring robust interaction with the Grafeas service.

pip install grafeas
INSTALL
IMPORT
SIG · GRAFEAS
G
grafeas
gcppythonv1.23.0
Install
5.4s avg
Import
1882ms
Disk
67MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.23.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 2.246s · 68.8MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 5.4s · import 1.518s · 67MB
67MB installed
● package 67MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GrafeasClient
import grafeas
from grafeas import GrafeasClient

This quickstart demonstrates how to instantiate the Grafeas client and list all notes within a specified Google Cloud project. Ensure your `GOOGLE_CLOUD_PROJECT` environment variable is set or replace `'your-project-id'` with your actual project ID. Authentication is handled implicitly if `GOOGLE_APPLICATION_CREDENTIALS` is set or if running in a Google Cloud environment.

import os from grafeas import grafeas_v1 # Your Google Cloud Project ID project_id = os.environ.get('GOOGLE_CLOUD_PROJECT', 'your-project-id') def list_all_notes(project_id): """Lists all notes in a given project.""" client = grafeas_v1.GrafeasClient() parent = f"projects/{project_id}" print(f"Listing notes for project: {project_id}") try: for note in client.list_notes(parent=parent): print(f" Note: {note.name} (Kind: {note.kind.name})") except Exception as e: print(f"An error occurred: {e}") if __name__ == '__main__': list_all_notes(project_id)
Debug
Known issues
breakingThe `grafeas` library underwent significant breaking changes in version 1.0.0 due to a complete regeneration using Google's microgenerator. This resulted in a change to the client surface and package structure compared to older versions (e.g., `grafeas<1.0.0`).
fix
Upgrade to `grafeas>=1.0.0` and update import paths and client instantiation as per the latest documentation, typically using `from grafeas import grafeas_v1`.
affects: <1.0.0
breakingSupport for older Python versions (Python <= 3.8) has been dropped. If you are using an unsupported Python version, you may encounter installation or runtime errors.
fix
Upgrade your Python environment to version 3.9 or higher. For Python 2.7, the last compatible version was `grafeas==0.4.1`.
affects: <=3.8
gotchaIncorrect or missing authentication setup is a common issue when using Google Cloud client libraries. Without proper authentication, API calls will result in `Unauthorized` errors.
fix
Ensure that `GOOGLE_APPLICATION_CREDENTIALS` environment variable points to a valid service account key file, or that your execution environment (e.g., GCE, Cloud Run, Cloud Functions) has appropriate service account permissions. Alternatively, provide credentials explicitly during client instantiation.
affects: All
Upgrade
Version history
1.23.0latest on PyPI · released Jun 3, 2026
Audit
Dependencies
pythonrequiredRequired Python version.
google-api-corerequiredCore library for Google API clients, handling underlying RPC communication and common features.
google-authrequiredHandles authentication with Google Cloud services.
Agent activity
34 hits · last 30 days
node
32
OpenAI (training)
1
Resources
grafeas — pip install grafeas · libregistry