Skip to main content

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 MB
  • runtime: runtime of the function "python312"
  • trigger: http or pubsub the value is the name of the topic
  • dependencies: 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shopcloud-serverless-4.29.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

shopcloud_serverless-4.29.0-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file shopcloud-serverless-4.29.0.tar.gz.

File metadata

  • Download URL: shopcloud-serverless-4.29.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for shopcloud-serverless-4.29.0.tar.gz
Algorithm Hash digest
SHA256 511da3bcf67531355ff4a60413c61e0ae6aeecbd7aaf95f147b53b2960202d2a
MD5 bf908c860ea4213b9cc7697735aa9392
BLAKE2b-256 ff8673955c4e9c22b0bf578f2abcf10b29b6ecdabb3c814d229669f5966daeb6

See more details on using hashes here.

File details

Details for the file shopcloud_serverless-4.29.0-py3-none-any.whl.

File metadata

File hashes

Hashes for shopcloud_serverless-4.29.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9fbfdf98dfd3a6ed2c1d64830cc461797cf7308a1b13f317dbe5aea5bb82f308
MD5 f8d74ba1a804ea99a79873dc70563cd7
BLAKE2b-256 966294998c584154b98276ccb7bcec9132297321cf02c18fb74dda8b3a0f1a7d

See more details on using hashes here.

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