semvec/pypi-packages huggingface dataset:
hydraters 0.1.3
Hydrate Python dictionaries with Rust.
Requires Python: >=3.9

# hydraters

[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/developmentseed/hydraters/pr.yaml?style=for-the-badge)](https://github.com/developmentseed/hydraters/actions/workflows/pr.yaml)
[![PyPI - Version](https://img.shields.io/pypi/v/hydraters?style=for-the-badge)](https://pypi.org/project/hydraters/)

Hydrate Python dictionaries with Rust.
A general-purpose algorithm, used in [pgstac](https://github.com/stac-utils/pgstac) to reduce the size of the `items` table.

```python
import hydraters

base = {"a": "first", "b": "second", "c": {"d": "third"}}
item = {"c": {"e": "fourth", "f": "fifth"}}
result = hydraters.hydrate(base, item)
assert result == {
    "a": "first",
    "b": "second",
    "c": {"d": "third", "e": "fourth", "f": "fifth"},
}

```

If you want to clean out any lingering ``DO_NOT_MERGE_MARKER`` entries after
hydration, pass ``strip_unmatched_markers=True``. This will call
``hydraters.strip_unmatched_markers`` on the hydrated item before it is
returned and will emit the same warning when markers are stripped.

```python
import warnings
import hydraters

item = {"a": hydraters.DO_NOT_MERGE_MARKER, "b": {"c": "value"}}

with warnings.catch_warnings():
    warnings.simplefilter("ignore")
    hydraters.hydrate({}, item, strip_unmatched_markers=True)

assert item == {"b": {"c": "value"}}
```

Strip existing data back to a clean state by removing any keys whose value is
``DO_NOT_MERGE_MARKER``. A warning lists every stripped path using JSONPath
dot notation (for example ``$.assets[0].href``).

```python
item = {
    "a": hydraters.DO_NOT_MERGE_MARKER,
    "b": {"c": hydraters.DO_NOT_MERGE_MARKER, "d": 1},
}

hydraters.strip_unmatched_markers(item)
assert item == {"b": {"d": 1}}
```

## Installation

```shell
python -m pip install hydraters
```

Or, if you're using **uv**:

```shell
uv add hydraters
```

## Developing

Get [Rust](https://rustup.rs/) and [uv](https://docs.astral.sh/uv/getting-started/installation/).
Then:

```shell
git clone git@github.com:developmentseed/hydraters.git
cd hydraters
uv sync
uv run pre-commit install
```

To run tests:

```shell
uv run pytest
```

## Background

The code for this package was taken from [pypgstac](https://github.com/stac-utils/pgstac/blob/f1d71d5e00392acb970e3b19a62d5f1aa8d50cc6/src/pypgstac/src/lib.rs).
It came from some [benchmarking](https://github.com/gadomski/json-hydrate-benchmark) that determined it was much faster to do this operation in Rust than in pure Python.

## License

MIT
qcinf 0.2.1
Cheminformatics algorithms and structure utilities using standardized qcio data structures.
Requires Python: >=3.10

# Quantum Chemistry Informatics (qcinf)

[![image](https://img.shields.io/pypi/v/qcinf.svg)](https://pypi.python.org/pypi/qcinf)
[![image](https://img.shields.io/pypi/l/qcinf.svg)](https://pypi.python.org/pypi/qcinf)
[![image](https://img.shields.io/pypi/pyversions/qcinf.svg)](https://pypi.python.org/pypi/qcinf)
[![Actions status](https://github.com/coltonbh/qcinf/workflows/Tests/badge.svg)](https://github.com/coltonbh/qcinf/actions)
[![Actions status](https://github.com/coltonbh/qcinf/workflows/Basic%20Code%20Quality/badge.svg)](https://github.com/coltonbh/qcinf/actions)

Cheminformatics algorithms and structure utilities using standardized [qcio](https://qcio.coltonhicks.com/) data structures.

## The QC Suite of Programs

`qcinf` works in harmony with a suite of other quantum chemistry tools for fast, structured, and interoperable quantum chemistry.

- [qcconst](https://github.com/coltonbh/qcconst) - Physical constants, conversion factors, and a periodic table with clear source information for every value.
- [qcio](https://github.com/coltonbh/qcio) - Elegant and intuitive data structures for quantum chemistry, featuring seamless Jupyter Notebook visualizations. [Documentation](https://qcio.coltonhicks.com)
- [qcinf](https://github.com/coltonbh/qcinf) - Cheminformatics algorithms and structure utilities using standardized [qcio](https://qcio.coltonhicks.com/) data structures.
- [qccodec](https://github.com/coltonbh/qccodec) - A package for translating between standardized [qcio](https://github.com/coltonbh/qcio) data structures and native QC program inputs and outputs.
- [qcop](https://github.com/coltonbh/qcop) - A package for operating quantum chemistry programs using standardized [qcio](https://qcio.coltonhicks.com/) data structures. Compatible with `TeraChem`, `psi4`, `QChem`, `NWChem`, `ORCA`, `Molpro`, `geomeTRIC` and many more.
- [BigChem](https://github.com/mtzgroup/bigchem) - A distributed application for running quantum chemistry calculations at scale across clusters of computers or the cloud. Bring multi-node scaling to your favorite quantum chemistry program.
- `ChemCloud` - A [web application](https://github.com/mtzgroup/chemcloud-server) and associated [Python client](https://github.com/mtzgroup/chemcloud-client) for exposing a BigChem cluster securely over the internet.

## Installation

```bash
python -m pip install qcinf
```

## Support

If you have any issues with `qcinf` or would like to request a feature, please open an [issue](https://github.com/coltonbh/qcinf/issues).
graylog-api-client 0.1.2
A Python wrapper for the Graylog REST API
Requires Python: >=3.13
Keywords: graylog, REST, API Wrapper

### This is a low level Graylog API Wrapper heavily based on the guide by [pretzel](https://www.pretzellogix.net/2021/12/08/how-to-write-a-python3-sdk-library-module-for-a-json-rest-api/).
As there are a lot of endpoints not all of them are implemented by now. I started by implementing the GET requests first.
Also the API responses all follow very different schemas and an implementation of that into Python is probably not worth the effort which is why the responses from this API are so low-level.
Feel free to add endpoints or schemas in PRs if you need them :)
#### Last tested Graylog Version is: 6.3.4

### Example Usage

```python
from graylog_api_client import GraylogAPI

# Initialize the GraylogAPI client
api = GraylogAPI(
    host="https://localhost:9000/api",  # Replace with your Graylog server URL
    api_key="your_api_key_here",       # Replace with your API key
    ssl_verify=True                   # /path/to/cert for custom certificate
)

# Example: Fetch all streams
streams = api.get_streams()

# Print the result
print("Streams:", streams.data)
```

Planned:
1. Tests that run against a Graylog instance to check if the Wrapper works after Graylog Updates


### Test Environment:
1. Install docker and docker-compose
2. Copy the sample docker-compose file by [Graylog](https://github.com/Graylog2/docker-compose) for the open-core (or enterprise if you want to see all API endpoints) and create a .env file with the needed values
3. docker-compose up
4. Log in and create an api-key
s3-reader 0.4.0
Python library to read S3 file as local file.
Requires Python: >=3.9
Keywords: aws, s3, file, read

# s3-reader

[![test](https://github.com/rcmdnk/s3-reader/actions/workflows/test.yml/badge.svg)](https://github.com/rcmdnk/s3-reader/actions/workflows/test.yml)
[![test coverage](https://img.shields.io/badge/coverage-check%20here-blue.svg)](https://github.com/rcmdnk/s3-reader/tree/coverage)

Python library to read S3 file as local file.

## Requirement

- Python >=3.9

## Installation

```bash
$ pip install s3-reader
```

## Usage

```
from s3_reader import File


def check_s3_file(path):
    file = File(path)

    with open(file.path) as f:
        ...

check_s3_file('s3://<bucket>/path/to/file')

```

In this example, the S3 file is downloaded when `file = File(path)` is
executed, and it is stored as a temporary file.

`file.path` refers to the path of the locally stored temporary file.

At the end of the `check_s3_file` function, the file object is deleted, and
consequently, the temporary file is also deleted.

If path refers to a local file instead of an S3 file, File simply copies the
path, and you can use the File object in the same manner.

You can pass following parameters to `File` constructor to setup AWS credential:

```
profile_name : str | None
    AWS profile name.
aws_access_key_id : str | None
    AWS access key id.
aws_secret_access_key : str | None
    AWS secret access key.
aws_session_token : str | None
    AWS session token.
region_name : str | None
    AWS region name.
role_arn : str | None
    AWS role arn for Assume role. If this is set, aws_access_key_id,
    aws_secret_access_key, aws_session_token are replaced by Assume role.
session_name : str
    AWS session name. Default is "s3_reader".
retry_mode : str
    Retry mode for failed requests. Default is "standard".
max_attempts : int
    Maximum number of retry attempts for failed requests. Default is 10.
use_device_code : bool
    Whether to use device code flow for SSO login. Default is False.
max_trials : int
    Maximum number of trials to retry after retrieving credential error.
    Default is 10.
```