semvec/pypi-packages huggingface dataset:
appsync-copier 0.0.3
Copy Models in App Sync
Requires Python: >=3.6



example:

```sh
pip install appsync-copier
```

Make a .env file and add
- GRAPHQL_URL
- ACCESS_KEY
- SECRET_KEY

Make a schema.graphql
and paste the schema models..

Continue with the following example:

```python

from appsync_copier import AppSyncCopier, AppSyncClient
from dotenv import load_dotenv
import boto3
import os
load_dotenv()

region = boto3.Session().region_name
client = AppSyncClient(os.getenv("GRAPHQL_URL"),
                       os.getenv("ACCESS_KEY"),
                       os.getenv("SECRET_KEY"),
                       region)

copier = AppSyncCopier(
    schema_path="schema.graphql",
    client=client,
)


copier.copy_model(
    "MODEL_NAME",
    "MODEL_ID"
)


```
discord-embed-model 0.1.3
discord.py advanced embeds
Requires Python: >=3.8

# discord_embed_model

this is an extension of the discord.py library that provides many useful features for creating and modifying embeds

## Installation

```bash
pip install discord-embed-model
```

## Usage

1. transforming discord embed into a pydantic instance

```py
from discord import Embed as DiscordEmbed
from discord_embed_model import Embed, to_pydantic_embed

discordEmbed : DiscordEmbed
embed : Embed = to_pydantic_embed(discordEmbed)
```

2. formatting embeds using templates

```py
from discord_embed_model import Formatter

template = Formatter(
    title="hello {user.mention}
)

user : discord.User
embed = template.format(user=user) # embed.title == "hello @user"
```

3. embed that is retrievable

```py
from discord import Interaction
from discord_embed_model import StatefulEmbed

embed = StatefulEmbed(
    title="i can get this back",
)

embed.cache()

# sent out to discord

interaction : Interaction

# get embed
rembed = interaction.message.embeds[0]

retrieved = StatefulEmbed.retrieve(rembed, target_storage=rembed.TARGET_STORAGE, method=rembed.TARGET_CONTEXT)
assert retrieved is embed

```