Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yankeexe/openfaas-functions

Collection of Serverless OpenFaas functions.
https://github.com/yankeexe/openfaas-functions

docker faas kubernetes openfaas openfaas-function serverless serverless-functions

Last synced: 9 days ago
JSON representation

Collection of Serverless OpenFaas functions.

Awesome Lists containing this project

README

        

# OpenFaas Functions

Read my blog on [OpenFaas Functions](https://dev.to/yankee/deploy-your-serverless-python-function-locally-with-openfaas-in-kubernetes-18jf)

## 1. [pydict](https://github.com/yankeexe/openfaas-functions/tree/master/pydict)
Returns meaning of words provided.

Installation Instructions

**Build, Push, and Deploy the function**
```bash
faas-cli build -f functions.yml --filter pydict

faas-cli push -f functions.yml --filter pydict

faas-cli deploy -f functions.yml --filter pydict
```

**Invoke the function:**

```bash
echo "brevity" | faas-cli invoke pydict
```

## 2. [ytdl](https://github.com/yankeexe/openfaas-functions/tree/master/ytdl)
Download mp3 from provided URL
Installation Instructions

**Build, Push, and Deploy the function**
```bash
faas-cli build -f functions.yml --filter ytdl -b ADDITIONAL_PACKAGE=ffmpeg

faas-cli push -f functions.yml --filter ytdl

faas-cli deploy -f functions.yml --filter ytdl
```

**Invoke the function:**

```bash
echo "" | faas-cli invoke ytdl >
```

## 3. [translator](https://github.com/yankeexe/openfaas-functions/tree/master/translator)
Translate between languages.
Installation Instructions

**Build, Push, and Deploy the function**
```bash
faas-cli build -f functions.yml --filter translator

faas-cli push -f functions.yml --filter translator

faas-cli deploy -f functions.yml --filter translator
```

**Invoke the function:**
Make sure the terminal supports encoding. If not use API testing tool like Insomnia or Postman.

`des`: output language; defaults to `'en'`.

Complete list of [supported languages](https://github.com/yankeexe/openfaas-functions/tree/master/translator/README.md).

```bash
echo '{"text": "नमस्ते", "des": "ko"}' | fc invoke translator --content-type "application/json"
```