semvec/pypi-packages huggingface dataset:
hectiq-config 1.1.0
A simple API to manipulate configuration files
Requires Python: >=3.8

# Hectiq Config

This Python module provides a powerful and flexible configuration management system based on Pydantic models. It is designed to create, manage, and validate configurations with ease.

## Features

- **Dynamic Configuration Classes**: Utilize Pydantic to dynamically create configuration models from dictionaries.
- **Validation and Casting**: Validate configurations against a defined template and cast configurations to ensure correct types and structures.
- **Serialization and Deserialization**: Load and save configurations from and to JSON files using `orjson` for efficient IO operations.
- **Nested Configurations**: Support for nested configurations, allowing complex, hierarchical settings to be managed cleanly and efficiently.

## Dependencies

- `pydantic`: Used for creating data models and validation.
- `orjson`: Used for fast JSON serialization and deserialization.
- `re`: Used for regex operations, particularly in handling aliases in configuration keys.

## Installation

```bash
pip install hectiq-config
```

## Usage

### Creating a Configuration

```python
from hectiq_config import Config

config = Config(a="12345", b=12345, c=[1, 2, 3], d={"x": 1, "y": 2})
```

### Loading and Saving Configurations

```python
config.save('path/to/config.json')
loaded_config = Config.load('path/to/config.json')
```

### Validating Configurations

You can validate a configuration against a template to ensure it has the correct structure and types. A template is a dictionary that defines the expected structure of the configuration.


For example, define a template as follows:

```python
template = {
    "a": str,
    "b": int,
    "c": list,
    "d": {
        "x": int,
        "y": int
    }
}
```
Then validate the configuration against the template:

```python
is_valid = config.validate(template=template, raise_exception=True)
```
tif-to-zarr 0.5
Simple package to convert small tif files to zarr format.

This script could be used for conversion of a .tiff file to .zarr format with OME-NGFF multiscales metadata structure.
#### How to run
1. open command line terminal
2. install poetry tool for dependency management and packaging: https://pypi.org/project/poetry/
3. switch to the tif_to_zarr directory:
    ``cd PATH_TO_DIRECTORY/tif_to_zarr``
4. install python dependencies:
    ``poetry install``
5. run script using cli:
    ``poetry run python src/tif_to_zarr.py --src=PATH_TO_SOURCE_DIRECTORY/input_file.tif --dest=PATH_TO_DEST_DIRECTORY/output_file.zarr``
6. to convert a tiff file to zarr with custom metadata values, you can run smthg similar to this:
``poetry run python3 src/tif_to_zarr.py --src=path_to_source_tif  --dest=path_to_output_zarr -a x z y -t 1.0 2.0 3.0 -s 4.0 5.0 6.0 -u nanometer nanometer nanometer``
7. To get the list of options, you may run this:
``poetry run python3 src/tif_to_zarr.py --help``