semvec/pypi-packages huggingface dataset:
mindsdb-text-to-sql 0.1.1
MindsDB Text to SQL, converts natural language to SQL code.
Requires Python: >=3.7

# MindsDB Text to SQL

MindsDB Text to SQL is a Python package that allows you to convert natural language queries into SQL code that can be run on MindsDB. With this package, you can easily build models using MindsDB's in-database machine learning capabilities by simply describing what you want to predict in natural language.

This package uses the OpenAI API to convert natural language queries into SQL code that can be run on MindsDB.

## Installation
### With pip
```
pip install mindsdb_text_to_sql
```

## Usage
The library will first need to be configured with an API key from OpenAI.
```
from mindsdb_text_to_sql import GPTTextToSQL

text_to_sql = GPTTextToSQL('sk-...')
query = text_to_sql.convert_text_to_sql(
    "Get all rows from the iris table of the sqlite_datasource where the sepal_length is greater than 5"
)
```
asynctranslator 1.0.1
Typed Async-to-sync & Sync-to-async utility
Requires Python: >=3.7,<4.0

# ASyncTranslator

A package to transform your **sync** methods to **async** methods and to turn **async** methods to **sync** methods.

🤩 ✨ **FINALLY TYPED EDITION!!!** ❤️ 🤌

This is an heavy inspiration from Django's implementation.
Please see https://github.com/django/asgiref/blob/30d891fab0a7caa265bda0cbe04bb35a00a3b3b9/asgiref/sync.py for original reference.

## Show me an example, pretty please.

Here you go!

To transform from an **async** to **sync** method:
```py
from asynctranslator import async_to_sync

async def my_async_func(food_name: str) -> int:
    print(f"{food_name} are my favorite!")
    return 42

def main():
    final_func = async_to_sync(my_async_func)
    result = final_func("Cookies")
    print(result)  # We got "42"!

main()
```

And now, to transform from a **sync** to **async** method:
```py
import asyncio
from asynctranslator import sync_to_async

def my_async_func(food_name: str) -> int:
    print(f"{food_name} are my favorite!")
    return 42

async def main():
    final_func = sync_to_async(my_async_func)
    result = await final_func("Cookies")
    print(result)  # We got "42"!

asyncio.run(main())
```

But you can also use it as a decorator!

```py
import asyncio
from asynctranslator import sync_to_async

@sync_to_async
def my_async_func(food_name: str) -> int:
    print(f"{food_name} are my favorite!")
    return 42

async def main():
    result = await my_async_func("Cookies")
    print(result)

asyncio.run(main())
```