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.34.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.34.0-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file shopcloud_serverless-4.34.0.tar.gz.

File metadata

  • Download URL: shopcloud_serverless-4.34.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.34.0.tar.gz
Algorithm Hash digest
SHA256 d1acfd48bfa3ccab8fb98a5e754a5a4721682dbe2f02e2ae19bbae047b356a37
MD5 e979cb29ce4f482416f96b26a56ebb98
BLAKE2b-256 c12163a328e8c22249f81bfdbfacf35edf52fed5ad603ab8bd87350faba81df0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for shopcloud_serverless-4.34.0-py3-none-any.whl
Algorithm Hash digest
SHA256 766b7c4da34af51579f71bacedbd818ac2c1bfcc6b6d2f9c8fba4c21c87ada80
MD5 7f62d7cd7e5e58aa78ffeb6fb0a09cfc
BLAKE2b-256 9bb6ff614c64e0cad2d2d2700765c8ac27c8894706797c515b9fe7f078e965ce

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