Comments (2)
Hi! Thanks for reporting this!
To verify, are you encountering this error?
ValidationError: 1 validation error for GcpCredentials
service_account_info
JSON object must be str, bytes or bytearray (type=type_error.json)
If so, I think it's because you need to do a json.dumps
on your Dict:
import json
from prefect import flow
from prefect_gcp.credentials import GcpCredentials
@flow()
def example_get_client_flow():
service_account_info = json.dumps({
"type": "service_account",
"project_id": "project_id",
"private_key_id": "private_key_id",
"private_key": "private_key",
"client_email": "client_email",
"client_id": "client_id",
"auth_uri": "auth_uri",
"token_uri": "token_uri",
"auth_provider_x509_cert_url": "auth_provider_x509_cert_url",
"client_x509_cert_url": "client_x509_cert_url"
})
client = GcpCredentials(
service_account_info=service_account_info
).get_secret_manager_client()
example_get_client_flow()
Let me know if that works for you!
from prefect-gcp.
Closing this, but feel free to reopen if you're still having issues with this!
from prefect-gcp.
Related Issues (20)
- Create GCS Project Push Step
- Fix Official Docs on upload_from_dataframe HOT 1
- Create GCS Project Pull Step
- Fix `upload_from_dataframe` Compressed Parquet serialization to .gz.parquet & .snappy.parquet HOT 1
- VPC Connector annotations are in the wrong place in CloudRunJob
- Proposal: Ability to set the default serviceAccountName to use the same service account that is provided in GCP Credential Block
- VertexAICustomTrainingJob does not have accelerator_count
- Worker dies because timeout is not respected HOT 12
- push_project_to_gcs is not working with credentials stored in a prefect block HOT 2
- `list_blobs` and `list_folder` log incorrect bucket name HOT 2
- Secret Manager support in `prefect_gcp.cloud_run`
- Add support of maxRetries to CloudRunJob HOT 2
- Client read_flow_runs state filter not working as expected HOT 1
- Upgrade Cloud Run to use API v2
- Persist Labels from Prefect to Vertex AI Job
- Create Prefect GCP Worker that works with Cloud Run v2 HOT 2
- Canceling flow does not stop Vertex AI custom training job
- Create GCP Vertex AI worker HOT 3
- Add `kill_infrastructure` support for Vertex AI Worker
- vpc-access-connector error in Google Cloud Run Work Pool
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prefect-gcp.