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
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 gcloud-functions-params-0.0.2.tar.gz.
File metadata
- Download URL: gcloud-functions-params-0.0.2.tar.gz
- Upload date:
- Size: 1.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44f12fea64c2a3cfc13bf2d53fe9e22437ed1596ca250ce0630b51cd5b87db1e
|
|
| MD5 |
0d4193618c9e8ffb1b4f4d2be55b730f
|
|
| BLAKE2b-256 |
34b7cbb440ebdd24e4134f8f858321e0ec8dfebc975e08dd379902361f3d953f
|
File details
Details for the file gcloud_functions_params-0.0.2-py3-none-any.whl.
File metadata
- Download URL: gcloud_functions_params-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18119b2817e8af0029f9a5cebb36b4678d9c50cc6dc422796aecff70273059f7
|
|
| MD5 |
0b0a71af4b09793371eb66800a31ee12
|
|
| BLAKE2b-256 |
0d4edc5a1dc09fd976a126e50cf068f7feeb90f15743c1dbdab79112bb9912fa
|