semvec/pypi-packages huggingface dataset:
gendit 1.0.0a2
simple large scale data generator
License: MIT
Requires Python: <4.0,>=3.10

## Geni

[![ci](https://github.com/FabienArcellier/geni/actions/workflows/main.yml/badge.svg)](https://github.com/FabienArcellier/blueprint-python3/actions/workflows/main.yml)

Geni helps you generate large-scale datasets.

```python
import geni
from faker import Faker

fake = Faker()

# Create a generator
def generator() -> dict:
    return {
        "name": fake.name(),
        "age": fake.random_int(18, 99),
        "city": fake.city()
    }

geni.generate_file(generator, row=1000, output="data.csv")
```

## The latest version

You can find the latest version to ...

```bash
git clone https://github.com/FabienArcellier/geni.git
```

## Usage

## Developper guideline

### Add a dependency

``bash
poetry add requests
``
### Install development environment

Use make to instanciate a python virtual environment in ./venv and install the
python dependencies.

```bash
poetry install
```

### Update release dependencies

Use make to instanciate a python virtual environment in ./venv and freeze
dependencies version

```bash
poetry update update
```

### Activate the python environment

When you setup the requirements, a `venv` directory on python 3 is created.
To activate the venv, you have to execute :

```bash
poetry shell
```

### Run the continuous integration process

Before commit or send a pull request, you have to execute `pylint` to check the syntax
of your code and run the unit tests to validate the behavior.

```bash
$ poetry run alfred ci
```

## Contributors

* Fabien Arcellier

## License

MIT License

Copyright (c) 2024-2024 Fabien Arcellier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
qload 1.0.3
python library to perform assertion on files
License: MIT
Requires Python: <4.0,>=3.8

# qload : better assertion on files

qload is a library to load or extract content of a file to perform assertion in automatic tests without
boilerplate. It support file from filesystem, ftp, s3, ...

## Benefits

* oneliner to assert on the content of a file
* useful differential when the test fails thanks to subpart extraction
* support for the most common formats (yaml, csv, json, txt)
* support for multiple file systems and protocols (local, ftp, s3)
* rich expression engine to extract part of a file ([regexp](https://docs.python.org/3/library/re.html#regular-expression-syntax) for `text` and [jmespath](https://jmespath.org) for `csv`, `json` and `yaml` to improve differential) 

## Gettings started

```bash
pip install qload
```

## Usage

```python
import qload

assert 'database_url: postgresql://127.0.0.1:5432/postgres' in qload.text('file.txt')
assert qload.text('file.txt', expression='Hello .*') == 'Hello Fabien'

assert qload.json('file.json') == {}
assert qload.json('s3://mybucket/file1.json') == {}
assert qload.json('file.json', expression='$.id') == ''
assert len(qload.json('file.json', expression='$.id')) == 4

assert qload.yaml('file.yml')  == {}
assert qload.yaml('file.yml', expression='$.id')  == ''

assert qload.csv('file.csv', expression='[*].Account') == ['ALK', 'BTL', 'CKL']
assert qload.csv('file.csv', expression='[*].Account')[0] == 'ALK'

assert qload.parquet('file.parquet', expression='[*].Account')[0] == 'ALK'

assert qload.ftp(host='localhost', port=21, login='admin', password='admin').csv(path='dir/file.csv', expression='') == []
assert qload.s3(bucket='bucket', aws_access_key_id='', aws_secret_access_key='', region_name='eu-west-1', endpoint_url='http://localhost:9090').json(path='dir/file.csv') == {}


assert qload.isfile('file.json') is True
assert qload.s3(bucket='bucket').isfile('file.json') is True
```