semvec/pypi-packages huggingface dataset:
easy-pil 0.4.0
A Python library built on top of PIL to easily edit/modify images
Requires Python: <3.15,>=3.8.1
Keywords: easy-pil, easy pillow, Pillow, image editing

# Easy PIL
![Lint-Test](https://github.com/shahriyardx/easy-pil/actions/workflows/lint-test.yml/badge.svg)

A Python library built on top of [PIL](https://github.com/python-pillow/Pillow) to easily edit/modify images.

## Getting Started
Using this for the first time? Here are some links to help you get started.

- Read the [docs](https://easy-pil.readthedocs.io/en/latest/)
- First steps [Introduction](https://easy-pil.readthedocs.io/en/latest/pages/intro.html)
- Integrate in a [Discord bot](https://easy-pil.readthedocs.io/en/latest/pages/discordbot.html)
- Some premade [Examples](https://github.com/shahriyardx/easy-pil/tree/master/examples)
- [Report bugs](https://github.com/shahriyardx/easy-pil/issues/)

## Get help
- Ask us in our [Discord server](https://discord.gg/fVzt5THTNb)
- Watch [Youtube Tutorials](https://www.youtube.com/playlist?list=PLb_oBhGqAlbT4yVqV0TSXggA8b0lZhGhn)
streamed-yaml 0.1.3
Parse streamed (incomplete) single-level YAML
Requires Python: >=3.10

# Streamed YAML

> Parse streamed (incomplete) single-level YAML

```bash
pip install streamed-yaml
```

## Partial Parsing

Parse a partial, single-level YAML document. Returns `values, done`, where `done[key]` indicated whether `values[key]` is fully parsed.

```python
from streamed_yaml import parse

parse('key: value') # { 'key': 'value }, { 'key': False }` (values, done)

parse('''
  key: value
  key2
''') # { 'key': 'value }, { 'key': True }

parse('''
  key: value
  key2:
''') # { 'key': 'value', 'key2': '' }, { 'key': True, 'key2': False }

parse('''
  key: value
  key2: "Val...
''') # { 'key': 'value', 'key2': 'Val...' }, { 'key': True, 'key2': False }
```

## Streaming Updates

Parse an arbitrarily chunked stream of single-level YAML. Yields updates at the end of each chunk, s.t. concatenating them yields the full document.

```python
from streamed_yaml import chunked_parse

async def stream():
  yield 'key'      # no update
  yield ': value'  # -> Update(key='key', value='value', done=False)
  yield '\nke'     # -> Update(key='key', value='', done=True)
  yield 'y2: '     # -> Update(key='key2', value='', done=False)
  yield 'value2\n' # -> Update(key='key2', value='value2', done=True)

async for update in chunked_parse(stream()):
  print(update)
```
codelinker 0.3.27
A tool to link the code with large language models.
Requires Python: <4.0,>=3.10

# CodeLinker : Link your code with Language Models

CodeLinker aims to provide functions to link your code with language models.
It builds on top of the Pydatic library and Tool Calling abilities introduced by [OpenAI](https://platform.openai.com/docs/guides/function-calling), which enabling models to generate content according to [Json Schema](https://json-schema.org/).

## Usage

The core concept of this package is to treat language models as a function handler.
By defining a schema for return value of the function, we can call the function and let the model generate the return value.

To start with, we need to first define the configuration that will be used during exection:

```python
config = CodeLinkerConfig(api_keys={
    "gpt-3.5-turbo-16k":[{
        "api_key": "your api key here",
        "model": "model name alias here"
    }]
})
cl = CodeLinker(config)
```

Learn more about the configuration in the [Configuration](docs/configuration.md) page.

## Structured Generation

Currently, the package support two types of structured generation with language models: `Function Definition` and `Return Declearation`.

#### Function Definition

You can define the schema of the return value with pydantic package:

```python
class HelloWorldSchema(BaseModel):
    message: str = Field(description="the message to be returned")
```

Then we can use the `cl` object to wrap the function you want to call:

```python
@cl.smartFunc()
def hello_world() -> HelloWorldSchema:
    """Say hello to the world"""
```

The function's docstring will be passed to models as instruction about what this function should do.
Now we can call the function and let the model generate the return value:

```python
result = hello_world()
print(result.message)
# sample output:
# Hello, World!
```

#### Return Declearation

Other wise, if you do not want to define the function, you can use the `exec` method to call the function:

```python
result = await cl.exec(return_type=HelloWorldSchema)
```

To be noticed, the `exec` method is an async method, so you need to use `await` to call it.

More details about structured generation can be found in the [Structured Generation](docs/structuredgen.md) page.