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.30.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for shopcloud-serverless-4.30.0.tar.gz
Algorithm Hash digest
SHA256 db91deb1f651bef05d04ec06dc36b718c4ef7082b42691737fb72a62c6a16bee
MD5 d3c8135a166603ce500896d173c3e455
BLAKE2b-256 bd447cb0bb031f132118ebcda9bf748f6d08127b39827721edd0c0bad31a6f71

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for shopcloud_serverless-4.30.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3db7954fbee70c9099a78478224bbab78f4062321845204516cc6ddf79bda933
MD5 3ed6f036329bbafd1912211a99ff7feb
BLAKE2b-256 50fd4ffa25e19fd722916ead5cd179a9f70a62086c763052fe28122a29fec331

See more details on using hashes here.

Supported by

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