# Serverless CLI
Serverless tool for the Google Cloud. You need the `gcloud` installed.
## Install
````sh
$ pip install shopcloud-serverless
$ serverless init
````
## Jobs
```sh
$ 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.
```sh
$ serverless gateway init
```
```sh
$ serverless gateway deploy
```
## Endpoints
Create a new endpoint for every path.
```sh
$ 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](https://github.com/GoogleCloudPlatform/functions-framework-python)
```sh
$ serverless endpoints serve health
```
run the integration test suite
```sh
$ serverless endpoints test health
```
then deploy the function
```sh
$ serverless endpoints deploy health
```
Raw data
{
"_id": null,
"home_page": "https://github.com/Talk-Point/shopcloud-serverless-cli",
"name": "shopcloud-serverless",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "CLI",
"author": "Konstantin Stoldt",
"author_email": "konstantin.stoldt@talk-point.de",
"download_url": "https://files.pythonhosted.org/packages/e4/4f/dee5eb7644fbde673e8f171da7bbfa21c5a10f37d7b066893c9adff4b663/shopcloud-serverless-4.28.0.tar.gz",
"platform": null,
"description": "# Serverless CLI\n\nServerless tool for the Google Cloud. You need the `gcloud` installed.\n\n## Install\n\n````sh\n$ pip install shopcloud-serverless\n$ serverless init\n````\n\n## Jobs\n\n```sh\n$ serverless jobs init\n$ serverless jobs create <job-name>\n$ serverless jobs deploy <job-name>\n$ serverless jobs run <job-name>\n```\n\n__Secrets:__\nSecrets can you write in the `.env.temp` file with the SecretHub syntax.\n\n## Gateway\n\nThe main entrypoint for you serverless endpoint api is the gateway.\n\nInit the gateway with the function and then deploy the endpoints and then you can deploy the api.yaml file with gateway deploy endpoint.\n\n```sh\n$ serverless gateway init\n```\n\n```sh\n$ serverless gateway deploy\n```\n\n\n## Endpoints\n\nCreate a new endpoint for every path.\n\n```sh\n$ serverless endpoints init\n$ serverless endpoints create health\n```\n\nAdd the Endpoint in the `api.yaml` the `operation_id` must be unqie and is the identifier for the library.\nYou can change the `<endpoint-name>.yaml` with the parameters\n- `memory`: memory in MB\n- `runtime`: runtime of the function \"python312\"\n- `trigger`: http or pubsub the value is the name of the `topic`\n- `dependencies`: as string array\n\nfor development in the background we use [functions-framework](https://github.com/GoogleCloudPlatform/functions-framework-python)\n\n```sh\n$ serverless endpoints serve health\n```\n\nrun the integration test suite\n\n```sh\n$ serverless endpoints test health\n```\n\nthen deploy the function\n\n```sh\n$ serverless endpoints deploy health\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "CLI tool for creating a serverles api with API Gateway and Cloud Functions",
"version": "4.28.0",
"project_urls": {
"Homepage": "https://github.com/Talk-Point/shopcloud-serverless-cli"
},
"split_keywords": [
"cli"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "38b11c15a1a01e3752ed75f6b7fb2df676c9d447bd3d5954dedb4595dbdd82f6",
"md5": "27a352677fb85b8d4fab1082d8ccc20f",
"sha256": "f749f035ca1381fda71d1c5faf7d32973597fc6b7f182c21c0447e75a4f56080"
},
"downloads": -1,
"filename": "shopcloud_serverless-4.28.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "27a352677fb85b8d4fab1082d8ccc20f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 18703,
"upload_time": "2024-05-21T07:10:53",
"upload_time_iso_8601": "2024-05-21T07:10:53.803498Z",
"url": "https://files.pythonhosted.org/packages/38/b1/1c15a1a01e3752ed75f6b7fb2df676c9d447bd3d5954dedb4595dbdd82f6/shopcloud_serverless-4.28.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e44fdee5eb7644fbde673e8f171da7bbfa21c5a10f37d7b066893c9adff4b663",
"md5": "2a6ba32ec61a5eef8fdfaa1a837c8bfa",
"sha256": "c9a325fac660a80433ceb772e5551a1ad6b2b848450ea81cb12209c54ab625f8"
},
"downloads": -1,
"filename": "shopcloud-serverless-4.28.0.tar.gz",
"has_sig": false,
"md5_digest": "2a6ba32ec61a5eef8fdfaa1a837c8bfa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15009,
"upload_time": "2024-05-21T07:10:54",
"upload_time_iso_8601": "2024-05-21T07:10:54.916464Z",
"url": "https://files.pythonhosted.org/packages/e4/4f/dee5eb7644fbde673e8f171da7bbfa21c5a10f37d7b066893c9adff4b663/shopcloud-serverless-4.28.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-21 07:10:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Talk-Point",
"github_project": "shopcloud-serverless-cli",
"github_not_found": true,
"lcname": "shopcloud-serverless"
}