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.32.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.32.0-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: shopcloud_serverless-4.32.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for shopcloud_serverless-4.32.0.tar.gz
Algorithm Hash digest
SHA256 ba7883030f1d4ae031de224dadb623254640d3ec15e9bdc8b5a28f14c72ffcb1
MD5 89c0567d78767d1c2d734bbee38185ec
BLAKE2b-256 6216a07dc6bb3d6990cdb8701d79cf18f000b59121ba3e4f0e06eb2787e29812

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for shopcloud_serverless-4.32.0-py3-none-any.whl
Algorithm Hash digest
SHA256 95a550d3d7785ff7e65b0bfa00e5d5e1389d05832b6801506107b81379913a36
MD5 60ef9a10b8f34b89078ef7214bbaa73d
BLAKE2b-256 76d841843e5f6edb74b135e1761d03d198d3c84301810f07662b9d12b2dc680b

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