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

gcloud_functions_params-0.0.2-py3-none-any.whl (3.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page