The missing GCP Python Client Library
Project description
# Toto9 - The Missing GCP Python Client
The Google Python Client Library is missing stuff! This package fills in the gaps.
## Installation
Development Environment
Run pip install -e . from the root level of this repository. This symlinks the package so that source files are available as soon as they are updated.
### Development
export GOOGLE_APPLICATION_CREDENTIALS=PATH_TO_YOUR_CREDENTIALS_FILE
export GOOGLE_PROJECT_ID=YOUR_PROJECT_ID (for tests)
virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt
pip install -e .
All Other Environments
pip install toto9
## Usage
### Authentication
Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of your credentials. Alternatively, pass in the path to your credentials and list of scopes to the service classes with credentials_path and scopes kwargs.
### Interacting with GCP Service Accounts
` from toto9.serviceaccount import ServiceAccountproject_id = ‘foo-bar-project-id’ service_account = ServiceAccount() sa_list = service_account.list(project_id) print(sa_list) `
## Contributing
Create an issue in gitlab
Write the code
Write tests, make sure they are meaningful and pass
Submit MR against issue
Merge
## References
## Test
You should test your modules! Tests are in the tests directory. Name your file test_*.py so the unittest module will pick it up.
### Setup and Run
` export GOOGLE_PROJECT_ID=YOUR_PROJECT_ID export GOOGLE_APPLICATION_CREDENTIALS=PATH_TO_YOUR_CREDENTIALS_FILE `
Run all tests with python -m unittest.
## TODO
DONE Testing
DONE create service account
DONE delete service account
DONE update service account
TODO map/unmap service account to project with role
TODO add/remove member to service account for ownership/management
TODO implement logic for assigning permissions
TODO write/update metadata in project
TODO use batch sometimes? https://developers.google.com/api-client-library/python/guide/batch
DONE make this a proper package
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file toto9-0.1.6.tar.gz.
File metadata
- Download URL: toto9-0.1.6.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7862f285c599b2054c8711d35b014eae4f9dbc9f7422dcef42b418084a1dd50
|
|
| MD5 |
f7e4c8612d6d89f5aac0e37dfc9b79b2
|
|
| BLAKE2b-256 |
41870c36338e8e965d7ff3e407e26c699838a480381e3718cd51df642cf0c4ac
|
File details
Details for the file toto9-0.1.6-py3-none-any.whl.
File metadata
- Download URL: toto9-0.1.6-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5bbb396b068b6c70fb65b6961c7f9d0aa0474f534dbf56e75609c05145439ed0
|
|
| MD5 |
b47454e3315987af5da8af11c6c6fd03
|
|
| BLAKE2b-256 |
ae90b86185ca6f024fbc6ce11e175f249478e7176257fbdbca6c8fb8bd3eab76
|