Metadata-Version: 2.1
Name: scw-gateway
Version: 0.6.1
Summary: CLI to deploy and manage a self-hosted Kong gateway on Scaleway Serverless Ecosystem
Home-page: https://github.com/scaleway/serverless-gateway
Keywords: serverless,scaleway,gateway,cloud,caas
Author: Simon Shillaker
Author-email: sshillaker@scaleway.com
Requires-Python: >=3.10,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Requires-Dist: click (>=8.1.3,<9.0.0)
Requires-Dist: loguru (==0.6.0)
Requires-Dist: pyyaml (>=6.0,<7.0)
Requires-Dist: requests (>=2.28.2,<3.0.0)
Requires-Dist: rich (>=13.4.2,<14.0.0)
Requires-Dist: scaleway (>=0.12.0,<0.13.0)
Project-URL: Documentation, https://serverless-gateway.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/scaleway/serverless-gateway
Description-Content-Type: text/markdown

# <img src="https://raw.githubusercontent.com/scaleway/serverless-gateway/main/logo.png" height="32"/> Scaleway Serverless Gateway

[![PyPI version](https://badge.fury.io/py/scw-gateway.svg)](https://badge.fury.io/py/scw-gateway)
[![Documentation Status](https://readthedocs.org/projects/serverless-gateway/badge/?version=latest)](https://serverless-gateway.readthedocs.io/en/latest/?badge=latest)
[![Build status](https://github.com/scaleway/serverless-gateway/actions/workflows/build.yml/badge.svg)](https://github.com/scaleway/serverless-gateway/actions/workflows/build.yml/badge.svg)

The Scaleway Serverless Gateway is a self-hosted API gateway that runs on Scaleway [Serverless Containers](https://www.scaleway.com/en/serverless-containers/).

It lets you manage routing from a single base URL, as well as handle transversal concerns such as CORS and authentication.

It is built on [Kong Gateway](https://docs.konghq.com/gateway/latest/), giving you access to the [Kong plugin ecosystem](https://docs.konghq.com/hub/) to customize your deployments.

You can read all about it in [this blog post](https://www.scaleway.com/en/blog/api-gateway-early-access/).

If you would like to join in the discussion on how we continue developing the project, or give us feedback, then join us on the [#api-gateway-beta](https://app.slack.com/client/T7YEXCR7X/C05H07VBKJ4) channel on the Scaleway Community Slack.

## 📃 Contents


Please see [the docs](https://serverless-gateway.readthedocs.io) for full documentation and features.

## 💻 Quickstart

To deploy your gateway you need to install and configure the [Scaleway CLI](https://github.com/scaleway/scaleway-cli), and the [Gateway CLI](https://pypi.org/project/scw-gateway/) via [`pip`](https://pip.pypa.io/en/stable/index.html):

```console
pip install scw-gateway
```

Once done, the following steps can be run from the root of the project, and will deploy the gateway as a Serverless Container in your Scaleway account.

The gateway image itself is packaged via our public [Serverless Gateway Docker image](https://hub.docker.com/r/scaleway/serverless-gateway).

### Deploy your gateway

To deploy your gateway, you can run:

```console
scwgw infra deploy
```

For more information on the deployment process, see the [deployment docs](https://serverless-gateway.readthedocs.io/en/latest/deployment.html).

### Add a route

To check your gateway is working, you can add and remove a route:

```console
# Check no routes are configured initially
scwgw route ls

# Check the response directly from a given URL
TARGET_URL=http://worldtimeapi.org/api/timezone/Europe/Paris
curl $TARGET_URL

# Add a route to this URL in your gateway
scwgw route add /time $TARGET_URL

# List routes to see that it's been configured
scwgw route ls

# Curl the URL via the gateway
GATEWAY_ENDPOINT=$(scwgw infra endpoint)
curl https://${GATEWAY_ENDPOINT}/time
```

### Delete your gateway

To delete your gateway, you can run:

```console
scwgw infra delete
```

## 🎓 Contributing

We welcome all contributions to our open-source projects, please see our [contributing guidelines](./.github/CONTRIBUTING.md).

Do not hesitate to raise issues and pull requests we will have a look at them.

## 📬 Reach us

We love feedback. Feel free to:

- Open a [Github issue](https://github.com/scaleway/serverless-gateway/issues/new)
- Send us a message on the [Scaleway Slack community](https://slack.scaleway.com/), in the [#serverless-functions](https://scaleway-community.slack.com/app_redirect?channel=serverless-functions) channel.

