Skip to main content

package for manage params in python gcloud functions

Project description

# Gcloud functions params

package for manage params in python gcloud functions

## Install
```requirements.txt
gcloud-functions-params==0.0.2
```

## Http function

You can call the function sending arguments:

http://function-url?name=example

or sending json

```
curl http://function-url -H "Content-Type: application/json" -d '{"name": "example"}'
```

```python
from gcloud_functions_params import args_or_json_to_dict

def main(request):
params = args_or_json_to_dict(request)
```

## Pubsub function

you can send a json in the event message

message: '{"name": "example"}'

```python
from gcloud_functions_params import event_to_dict

def main(event, context):
params = event_to_dict(event)
```


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

gcloud-functions-params-0.0.2.tar.gz (1.6 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page