semvec/pypi-packages huggingface dataset:
pytpch 0.2.0
bindings to libdbgen / tpch-dbgen
License: MIT
Requires Python: >=3.8
Keywords: tpc-h

Ergonomically create [TPC-H](https://www.tpc.org/tpch/) data thru Python as Arrow tables.


**NOTE**:
    This was a weekend project, it is a WIP. For now only x86_64 linux wheels are available on PyPI

```python

import pytpch
import pyarrow as pa

# Generate TPC-H data at scale 1 (~1GB)
tables: dict[str, pa.Table] = pytpch.dbgen(sf=1)

# Generate a single table at scale 1
tables: dict[str, pa.Table] = pytpch.dbgen(sf=1, table=pytpch.Table.Nation)

# Generate a single chunk out of n chunks of a single table
# this is wildly helpful when generating larger scale factors as you can make
# subsets of the data and store them or join them after some sort of parallelism.
tables: dict[str, pa.Table] = pytpch.dbgen(sf=1, table=pytpch.Table.Nation)


# NOTE! As mentioned in the docs for this function, it is NOT thread-safe.
#       If you want to generate data in parallel, you must do so in other processes for now
#       by using things like `multiprocessing` or `concurrent.futures.ProcessPoolExecutor`.
#       This is a TODO, as the original C code uses copious amounts of global and static function
#       variables to maintain state, and while the state is reset between function calls from refactoring
#       in milesgranger/libdbgen, these shared global states are not removed so thus not thread-safe.
#
# Example of generating data in parallel:
from concurrent.futures import ProcessPoolExecutor

n_steps = 10  # 10 total chunks

def gen_step(step):
    return pytpch.dbgen(sf=10, n_steps=n_steps, nth_step=step)

with ProcessPoolExecutor() as executor:
    jobs: list[dict[str, pa.Table]] = list(executor.map(gen_step, range(n_steps)))
  

# Default reference queries provided (1-22) as:
print(pytpch.QUERY_1)
```

---

### Tell me more...

Python bindings (thru Rust, b/c why not) to [libdbgen](https://github.com/milesgranger/libdbgen) 
which is a fork of [databricks/tpch-dbgen](https://github.com/databricks/tpch-dbgen) for generating 
[TPC-H data](https://www.tpc.org/tpch/).

tpch-dbgen is originally a CLI to generate CSV files for TPC-H data. I wanted to make it into an ergonomic
Python API for use in other projects. 

TODOS (roughly in order of priority):
  - [ ] Support for more than Linux x86_64 (mostly just adapting C lib and updating CI)
  - [ ] Remove verbose stdout
  - [ ] Write directly to Arrow, removing CSV writing (w/ nanoarrow probably)
  - [ ] Make thread safe (remove global and static function variables in C lib, and remove changing of CWD)
  - [ ] Separate out the Rust stuff into it's own crate.

### Build from source...

Roughly:

- `git clone --recursive git@github.com:milesgranger/pytpch.git`
- `python -m pip install maturin`
- `maturin build --release`

That'll only work if you're on x86_64 linux for now, you can try adapting `build.rs` but good luck with that. For now.
piston-rspy 0.4.3
Python bindings for piston_rs.
License: MIT
Requires Python: >=3.8, <3.13
Keywords: piston-rs,piston,emkc,code

<h1 align="center">piston_rspy</h1>
<p align="center">
<a href="https://pypi.python.org/pypi/piston_rspy/"><img height="20" alt="PyPI" src="https://img.shields.io/pypi/v/piston_rspy.svg"></a>
<a href="https://github.com/Jonxslays/piston_rspy/blob/master/LICENSE"><img height="20" alt="License" src="https://img.shields.io/github/license/Jonxslays/piston_rspy"></a>
<a href="https://pepy.tech/project/piston-rspy"><img height="20" alt="Build" src="https://pepy.tech/badge/piston-rspy"></a>
</p>

<p align="center">Python bindings for <a href="https://github.com/Jonxslays/piston_rs"><code>piston_rs</code></a>.</p>

## What is piston_rspy?

piston_rspy provides Python users the ability to interact with the
[Piston](https://github.com/engineer-man/piston) code execution engine,
but behind the scenes it is powered by [piston_rs](https://github.com/Jonxslays/piston_rs),
a Rust library designed for the same purpose.

## Getting started

piston_rspy officially supports Python versions 3.8, 3.9, 3.10, 3.11, and 3.12.

For an in depth look at the API, check out the [documentation](https://jonxslays.github.io/piston_rspy/piston_rspy/)!

### Installation

```bash
pip install piston_rspy
```

### Usage

Fetching the available runtimes from Piston.

```py
import asyncio

import piston_rspy


async def main() -> None:
    client = piston_rspy.Client()
    runtimes = await client.fetch_runtimes()

    print(runtimes)


if __name__ == "__main__":
    asyncio.run(main())
```

---

Executing python code via Piston.

```py
import asyncio

import piston_rspy


async def main() -> None:
    file = piston_rspy.File(
        name="main.py",
        content="for i in range(10): print(i)",
    )

    executor = piston_rspy.Executor(
        language="python",
        version="3.10",
        files=[file],
    )

    client = piston_rspy.Client()
    response = await client.execute(executor)

    print(f"Language: {response.language} v{response.version}")

    if response.compile:
        print(f"Compilation:\n{response.compile.output}")

    print(f"Output:\n{response.run.output}")


if __name__ == "__main__":
    asyncio.run(main())
```

---

The builder flow that is used in `piston_rs` is available in
`piston_rspy` as well.

```py
import asyncio

import piston_rspy


async def main() -> None:
    client = piston_rspy.Client()

    response = await client.execute(
        piston_rspy.Executor()
        .set_language("python")
        .set_version("3.10")
        .add_file(
            piston_rspy.File(
                name="main.py",
                content="for i in range(10): print(i)",
            )
        )
    )

    print(f"Language: {response.language} v{response.version}")

    if response.compile:
        print(f"Compilation:\n{response.compile.output}")

    print(f"Output:\n{response.run.output}")


if __name__ == "__main__":
    asyncio.run(main())
```

## License

piston_rspy is licensed under the [MIT License](https://github.com/Jonxslays/piston_rspy/blob/master/LICENSE).
poropilot 0.1.3
Interface for Riot API
License: MIT
Keywords: Riot,API,wrapper,Poro,Pilot,League of Legends,LoL,game,gaming,esports,riotgames,riot-api,riot-api-wrapper,riot-api-python,riot-api

<h1 align="center">💫 PoroPilot 💫</h1>
<p align="center">
  <em>Riot API made easy</em>
</p>

🚀 **Features**

PoroPilot is a Python library designed to simplify interactions with the Riot Games API. With a suite of classes tailored for ease of use, here’s what PoroPilot offers:

- **PoroPilot**: Your primary interface to the Riot API, handling initialization of essential details like the API key, region, and debug mode.

- **RequestHandler**: Manages the creation of requests to the Riot Games API, utilizing `UrlBuilder`for URL construction.

- **MatchApi** and **SummonerApi**: Facilitate querying of match and summoner information, respectively.

<br>

🛠️ Usage

Initially, you can start with `main.py`, but this approach will be phased out in future versions.

Here's a quick start guide to get you up and running:

      from poropilot import PoroPilot
      
      # Initialize PoroPilot with your API key and region
      euw1_pp = PoroPilot(api_key="your_api_key", region="euw1")
      
      # Fetch match details by its ID
      match_info = euw1_pp.match.by_match_id(match_id="your_match_id")
      
      # Fetch player details by summoner name
      summoner_info = euw1_pp.summoner.by_name(summoner_name="your_summoner_name")

<br>