CLI tool for creating a serverles api with API Gateway and Cloud Functions
Project description
Serverless CLI
Serverless tool for the Google Cloud. You need the gcloud installed.
Install
$ pip install shopcloud_serverless
$ serverless init
Jobs
$ serverless jobs init
$ serverless jobs create <job-name>
$ serverless jobs deploy <job-name>
$ serverless jobs run <job-name>
Secrets:
Secrets can you write in the .env.temp file with the SecretHub syntax.
Gateway
The main entrypoint for you serverless endpoint api is the gateway.
Init the gateway with the function and then deploy the endpoints and then you can deploy the api.yaml file with gateway deploy endpoint.
$ serverless gateway init
$ serverless gateway deploy
Endpoints
Create a new endpoint for every path.
$ serverless endpoints init
$ serverless endpoints create health
Add the Endpoint in the api.yaml the operation_id must be unqie and is the identifier for the library.
You can change the <endpoint-name>.yaml with the parameters
memory: memory in MBruntime: runtime of the function "python312"trigger: http or pubsub the value is the name of thetopicdependencies: as string array
for development in the background we use functions-framework
$ serverless endpoints serve health
run the integration test suite
$ serverless endpoints test health
then deploy the function
$ serverless endpoints deploy health
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 shopcloud_serverless-4.33.0.tar.gz.
File metadata
- Download URL: shopcloud_serverless-4.33.0.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6255ecdc9d5209d10ffb2cf95307a08747eba8a53284b82cf45d61ff1596c460
|
|
| MD5 |
b41ef1e7ecad61c213588a4092e07d11
|
|
| BLAKE2b-256 |
2cc013439d7afe02669b1858837bcceebb516970a42e221bf507e9f758a7a23d
|
File details
Details for the file shopcloud_serverless-4.33.0-py3-none-any.whl.
File metadata
- Download URL: shopcloud_serverless-4.33.0-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df4c867285f9ef7ba3be56a836af159ce43b923bf87f5df4bdba5bf9553e7708
|
|
| MD5 |
30c4a1f511e4c5b178b910db0bca2114
|
|
| BLAKE2b-256 |
b8a7fcdebbb0181fe065a36f37191ea65cdff593b6c1666ecc61932a611a37ef
|