semvec/pypi-packages huggingface dataset:
sql2arrow 0.1.3
This is a Python library that provides convenient and high-performance methods to parse INSERT SQL statements into Arrow arrays.
Requires Python: >=3.8
Keywords: arrow, sql, mysql, rust

# SQL2Arrow

This is a Python library that provides convenient and high-performance methods to parse INSERT SQL statements into Arrow arrays. It's very useful for analyzing data dumped by mysqldump or other tools.

## How to use

### Installation

Install the latest SQL2arrow version with:

```bash
pip install sql2arrow
```

### Parsing SQL str
```python
import sql2arrow

sql_str = '''
INSERT INTO `region` VALUES
	('', '', '2023-01-31 18:00:48', '2023-01-31 18:00:48', ''),
	('1541947646568607746', 'region name', '2022-06-29 08:52:21', '2022-06-29 08:52:21', 'D99'),
	('1541947680890597378', 'region name1', '2022-06-29 08:52:29', '2022-06-29 08:52:29', 'D98'),
	('620422117205', 'region name7', '2021-10-25 18:23:48', '2021-10-25 18:23:48', 'D620422117');
'''

columns = [
    sql2arrow.Column("region_code", sql2arrow.ArrowTypes.utf8()),
    sql2arrow.Column("region_name", sql2arrow.ArrowTypes.utf8()),
    sql2arrow.Column("create_time", sql2arrow.ArrowTypes.utf8()),
    sql2arrow.Column("update_time", sql2arrow.ArrowTypes.utf8()),
    sql2arrow.Column("parent_region_code", sql2arrow.ArrowTypes.utf8())
]

arrow_data = sql2arrow.parse_sql(sql_str, columns)
```


### Parsing sql files

```python
import sql2arrow

sql_paths = [
    "region.sql_0.gz", "region.sql_1.gz","region.sql_2.gz","region.sql_3.gz","region.sql_4.gz","region.sql_5.gz","region.sql_6.gz"
]

columns = [
    sql2arrow.Column("region_code", sql2arrow.ArrowTypes.utf8()),
    sql2arrow.Column("region_name", sql2arrow.ArrowTypes.utf8()),
    sql2arrow.Column("create_time", sql2arrow.ArrowTypes.utf8()),
    sql2arrow.Column("update_time", sql2arrow.ArrowTypes.utf8()),
    sql2arrow.Column("parent_region_code", sql2arrow.ArrowTypes.utf8())
]


partition_func_spec = sql2arrow.partition.IcebergPartitionFuncSpec()
partition_func_spec.add_partition("region_code", sql2arrow.partition.IcebergTransforms.bucket(30))


it = sql2arrow.SQLFile2ArrowIter(
    sql_paths,
    columns,
    4,
    1000,
    sql2arrow.CompressionType.SNAPPY,
    sql2arrow.Dialect.MYSQL,
    partition_func_spec
)

for arr in it:
    print(arr)
```


## arro3

SQL2Arrow uses arro3 as the default Python library for Apache Arrow. Thanks to the [Arrow PyCapsule Interface](https://arrow.apache.org/docs/format/CDataInterface/PyCapsuleInterface.html), we can seamlessly pass Arro3's Array data to other libraries compatible with the Arrow PyCapsule Interface, including PyArrow, Polars (v1.2+), Pandas (v2.2+), NanoArrow, and more, all with zero-copy memory.

```python
# some codes from above

import pyarrow as pa
tables = [pa.Table.from_arrays(a, names=names) for a in arrs]
```
## Limitations

### Dialect
    It currently supports only MySQL and PostgreSQL INSERT statements.
better-proxy 1.3.1
Better proxy!
Requires Python: <4.0,>=3.8

# Better Proxy
[![Telegram channel](https://img.shields.io/endpoint?color=neon&url=https://tg.sumanjay.workers.dev/cum_insider)](https://t.me/cum_insider)
[![PyPI version info](https://img.shields.io/pypi/v/better-proxy.svg)](https://pypi.python.org/pypi/better-proxy)
[![PyPI supported Python versions](https://img.shields.io/pypi/pyversions/better-proxy.svg)](https://pypi.python.org/pypi/better-proxy)
[![PyPI downloads per month](https://img.shields.io/pypi/dm/better-proxy.svg)](https://pypi.python.org/pypi/better-proxy)

Proxy as a class

- The `Proxy.from_str()` method supports most proxy formats (with and without protocol):
    ```
    host:port:login:password
    host:port@login:password
    login:password@host:port
    login:password:host:port
    host:port
    ```
- The `Proxy.from_file()` method returns the list of proxies from the file at the specified path


```bash
pip install better-proxy
```

## aiohttp
```python
import aiohttp
from better_proxy import Proxy
from aiohttp_socks import ProxyConnector

proxy = Proxy.from_str("socks5://user:password@127.0.0.1:1080")

async def fetch(url):
    connector = ProxyConnector.from_url(proxy.as_url)
    
    async with aiohttp.ClientSession(connector=connector) as session:
        async with session.get(url) as response:
            return await response.text()
```

## requests
```python
import requests
from better_proxy import Proxy

proxy = Proxy.from_str("http://user:password@host:port")    

def fetch(url):
    response = requests.get(url, proxies=proxy.as_proxies_dict)    
    return response.text
```

## playwright
[Playwright: http proxy](https://playwright.dev/python/docs/network#http-proxy)

```python
from playwright.async_api import async_playwright, Playwright
from better_proxy import Proxy

proxy = Proxy.from_str("http://user:password@host:port")

async def fetch(playwright: Playwright, url):
    chromium = playwright.chromium
    browser = await chromium.launch(proxy=proxy.as_playwright_proxy)
    ...
```

## httpx
```python
import httpx
from better_proxy import Proxy

proxy = Proxy.from_str("login:password@210.173.88.77:3001")

async def fetch(url):
    async with httpx.AsyncClient(proxy=proxy.as_url) as client:
        response = await client.get(url)
        return response.text
```

## httpx-socks
```python
import httpx
from httpx_socks import AsyncProxyTransport
from better_proxy import Proxy

proxy = Proxy.from_str("socks5://login:password@210.173.88.77:3001")

async def fetch(url):
    transport = AsyncProxyTransport.from_url(proxy.as_url)
    async with httpx.AsyncClient(transport=transport) as client:
        response = await client.get(url)
        return response.text
```
quantperf 1.0.5
QuantPerf

# QuantPerf

## QuickStart

```bash
# pip install quantperf
```

```python
import yfinance as yf
from quantperf import Metrics

daily_prices = yf.Ticker("AAPL").history()['Close']

# The input must be **daily** prices
metrics = Metrics(daily_prices)

print(metrics.stats)
```