semvec/pypi-packages huggingface dataset:
foostitch 1.1.0
A utility for assembling cloud-init user-data from a repository of templates.
License: MIT
Requires Python: >=3.6, <4

# foostitch

## Command-Line Usage

```text
usage: foostitch [option]* [recipe]
    -o, --output-file arg              filename for output
    -c, --configuration-file arg       filename for configuration
    -t, --template-directory           directory with templates

    recipe                             recipe name
```

## Configuration (aka Recipe) File Format

* loads configuration files with the following priority (highest to lowest):
    * files specified on the command line
    * `./.foostitch`
    * `~/.foostitch`
    * `/etc/foostitch`
* a JSON file of an object
    * if the key is "\*"
        * the value is an object that is the base context for all recipes
    * otherwise
        * the key is the name of a recipe
        * the value is a recipe
* a recipe is an array
    * if the first item is an object, that object overlays the base context for that recipe
    * if an item is a string
        * if the string begins with "\*", the remainder of the string is the name of a recipe to include at this point in the recipe
        * otherwise, the string is the filename of a `foostache` template; the filename path is relative to a template directory
    * if the item following a string is an object, that object overlays the base context for that item


## Template Files

* looks for templates in the following order:
    * directories specified on the command line
    * `./.foostitch-templates`
    * `~/.foostitch-templates`
    * `/etc/foostitch-templates`



## Configuration File

```text
CONFIG_FILE: {
    "*": CONTEXT
    RECIPE_NAME: RECIPE
}

RECIPE: [ CONTEXT?, (STEP, CONTEXT?)* ]

STEP:
    "*RECIPE_NAME"
    "TEMPLATE_FILENAME"
```

In a configuration file, the `"*"` context is the base context for everything contained in the file. (`[cfg]`)

In a recipe, if there is an initial context, it is applied to the file context to become the recipe context. (`[recipe, cfg]`)

In a step, if there is a context, it is applied to the recipe context to become the step context.  (`[tmpl, recipe, cfg]`)  If the step is an embedded recipe, the step context is applied to each step in the embedded recipe.
interactions-restful 2.0.0
A library for interactions.py allowing runtime API structures
License: MIT
Requires Python: >=3.10

# interactions restful

A library for interactions.py allowing runtime API structures

## Installation

Using pip:
`pip install interactions-restful`

Using poetry:
`poetry add interactions-restful`

Don't forget to specify backend you want to use:
- [FastAPI](https://fastapi.tiangolo.com/): `pip install interactions-restful[fastapi]`
- [Quart](https://pgjones.gitlab.io/quart/index.html): `pip install interactions-restful[quart]`

Also make sure to install an ASGI server:
- [Uvicorn](https://www.uvicorn.org/): `pip install interactions-restful[uvicorn]`
- [Hypercorn](https://pgjones.gitlab.io/hypercorn/): `pip install interactions-restful[hypercorn]`
- [Daphne](https://github.com/django/daphne): `pip install interactions-restful[daphne]`

You can also install both your backend and ASGI server at once, for example
`pip install interactions-restful[fastapi,uvicorn]`

## Simple (FastAPI) example

### Main file
- `main.py`

```python
import interactions
from fastapi import FastAPI
from interactions_restful.backends.fastapi import FastAPIHandler

app = FastAPI()

client = interactions.Client(token="token")
FastAPIHandler(client, app)

client.load_extension("api")
```

### Extension file
- `api.py`

```python
import interactions
from interactions_restful import route


class MyAPI(interactions.Extension):
    @route("GET", "/")
    def index(self):
        return {"status": "Hello, i.py"}

    @interactions.slash_command()
    async def test_command(self, ctx):
        await ctx.send("Hello, API")
```

### Run

```bash
uvicorn main:app --reload
```

## Backends

Currently, the library support only Quart and FastAPI as a backend for building an API, but if you don't want to use them you can create own backend.
foostache 1.3.0
The foostache template engine.
License: MIT
Requires Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4

[![PyPI version](https://badge.fury.io/py/foostache.svg)](https://badge.fury.io/py/foostache)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/foostache.svg)
![PyPI - License](https://img.shields.io/pypi/l/foostache.svg)

# foostache

**foostache** is a language and environment independent template engine.

Unlike alternatives such as Jinja2 and mustache, foostache can theoretically be implemented in any programming language for any runtime environment. The complete language specification can be found [here](https://github.com/ldgabbay/foostache).

This package provides a command-line utility and modules for Python 2 and 3.


## Example

A **template** is marked-up unicode that might look like this:
```text
{{:iterate my_array 1::2}}{{. %5.2f}}{{:before}}[{{:between}}, {{:after}}]{{:end}}
```

The template can be rendered given a **context**. The context is usually specified with a JSON value, such as:
```json
{ "my_array": [2.6, 4, 18, 3.51, 42, 96.8] }
```

When the above context is applied to the above template, the following output is generated:
```text
[ 4.00,  3.51, 96.80]
```


## Command-Line

```text
foostache template-file context-json-file
```

```text
python -m foostache template-file context-json-file
```


## Module

```python
import foostache

template = foostache.Template("{{:iterate .}}{{.}}{{:end}}")
assert template.render(["a", "b", "c"]) == "abc"
```