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)
```
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
Release history Release notifications | RSS feed
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
Close
Hashes for gcloud-functions-params-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44f12fea64c2a3cfc13bf2d53fe9e22437ed1596ca250ce0630b51cd5b87db1e |
|
MD5 | 0d4193618c9e8ffb1b4f4d2be55b730f |
|
BLAKE2b-256 | 34b7cbb440ebdd24e4134f8f858321e0ec8dfebc975e08dd379902361f3d953f |
Close
Hashes for gcloud_functions_params-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18119b2817e8af0029f9a5cebb36b4678d9c50cc6dc422796aecff70273059f7 |
|
MD5 | 0b0a71af4b09793371eb66800a31ee12 |
|
BLAKE2b-256 | 0d4edc5a1dc09fd976a126e50cf068f7feeb90f15743c1dbdab79112bb9912fa |