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.33.0.tar.gz (15.3 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.33.0-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

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

Hashes for shopcloud_serverless-4.33.0.tar.gz
Algorithm Hash digest
SHA256 6255ecdc9d5209d10ffb2cf95307a08747eba8a53284b82cf45d61ff1596c460
MD5 b41ef1e7ecad61c213588a4092e07d11
BLAKE2b-256 2cc013439d7afe02669b1858837bcceebb516970a42e221bf507e9f758a7a23d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for shopcloud_serverless-4.33.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df4c867285f9ef7ba3be56a836af159ce43b923bf87f5df4bdba5bf9553e7708
MD5 30c4a1f511e4c5b178b910db0bca2114
BLAKE2b-256 b8a7fcdebbb0181fe065a36f37191ea65cdff593b6c1666ecc61932a611a37ef

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