semvec/pypi-packages huggingface dataset:
piqel 0.202208.0
A implementation of PartiQL
License: MIT
Keywords: PartiQL SQL

<div align="center">
  <div>
    <img src="https://raw.githubusercontent.com/fuyutarow/piqel/alpha/docs/static/img/label.png"></img>
  </div>
  <strong>An implementation of PartiQL written in Rust</strong>

  <h3>
    <a href="https://partiql.vercel.app">Document(WIP)</a>
  </h3>
</div>

## Installation
```sh:$
pip install piqel
```
```sh:$
poetry add piqel
```

## Usage
```py:test_piqel.py
import piqel as pq

data = {
    "SHELL": "/bin/bash",
    "NAME": "my machine name",
    "PWD": "/home/fuyutarow/piqel",
    "LOGNAME": "fuyutarow",
    "HOME": "/home/fuyutarow",
    "LANG": "C.UTF-8",
    "USER": "fuyutarow",
    "HOSTTYPE": "x86_64",
    "_": "/usr/bin/env",
}
dl = pq.DataLake(data)
dl = dl.query("SELECT NAME, LOGNAME")
output = dl.to("json")
expected = """[{"NAME":"my machine name","LOGNAME":"fuyutarow"}]"""
assert output == expected
```

## Test

```sh:$
makers test:py
```


## Family

| content | lang | package |
| --- | --- | --- |
| [pq](https://github.com/fuyutarow/piqel/blob/alpha/src/bin/pq.rs) | CLI (brew, scoop) | |
| [piqel](https://github.com/fuyutarow/piqel) | Rust (cargo) | https://crates.io/crates/piqel |
| [piqel-js](https://github.com/fuyutarow/piqel/tree/alpha/piqel-js) | JavaScript (npm) | https://www.npmjs.com/package/piqel |
| [piqel-py](https://github.com/fuyutarow/piqel/tree/alpha/piqel-py) | Python (pip) | https://pypi.org/project/piqel |
snekcfg 0.1.1
A minimalist wrapper for configparser.
License: MIT
Keywords: config,configuration,configparser,options,settings

`snekcfg` is a minimalist wrapper over
[configparser](https://docs.python.org/3/library/configparser.html) that offers
a more streamlined user experience.

Expected options and their types are predefined to prevent errors and minimize
repetitive logic within your codebase. This allows for simple, direct access to
your configuration within your program without worrying about typos or type
conversion.

## example.py

```python
import snekcfg

cfg = snekcfg.Config('example.cfg')

sct = cfg.section('server')
# the default value is used to automatically type as an int
sct.define('port', 8080)
# or, you can be explicit
sct.define('host', default='127.0.0.1', type=str)

# some common types like set[str] are already built-in,
# but here is an example of adding a codec for a new type.
# *type* can be a type object, or just a string like 'str_set'
cfg.register_type(
    type=set[str],
    encode=lambda v: ','.join(v),
    decode=lambda v: set(v.split(',')))

# sections can be accessed using dot notation (one level deep)
cfg.define('users.whitelist', default=set(), type=set[str])

# update values with dot notation
users = {'graham', 'john', 'terryg', 'eric', 'terryj', 'michael'}
cfg['users.whitelist'].update(users)
# or through the section
cfg.section('server')['port'] = 1337

# write to 'example.cfg'
cfg.write()

# let's tweak the config file externally
with open('example.cfg', 'r+') as f:
    s = f.read()
    f.seek(0)
    f.write(s.replace('1337', '1234'))

# read from 'example.cfg'
cfg.read()

# types are preserved
assert cfg['server.port'] == 1234
assert cfg['users.whitelist'] == users, users
```

## example.cfg

```ini
[server]
host = 127.0.0.1
port = 1337

[users]
whitelist = eric,graham,michael,john,terryg,terryj
```