semvec/pypi-packages huggingface dataset:
stablerandom 0.10.46
Create stable/repeatable numpy.random applications
Requires Python: <4.0,>=3.10

# stablerandom
stablerandom provides a stable and repeatable implementation of 
the NumPy random number generator (numpy.random). With this package, 
you can generate the same sequence of random numbers across different 
platforms and Python environments, ensuring reproducibility 
in scientific computing, machine learning, and unit testing.

stablerandom can decorate any function or method and provide a 
call-stack scoped seeded random generator. stablerandom can also be used
as a Context. It is thread safe and supports nested scopes.

## Example decorator
Using the `@stablerandom` decorator to get a stable output for numpy.random.triangular

 ```python
import numpy.random
from stablerandom import stablerandom

@stablerandom
def random_triangular(samples):
    return numpy.random.triangular(1, 5, 10, samples)

print(random_triangular(3))
>>> [5.1017943  2.64970963 8.6996913 ]
print(random_triangular(3))
>>> [5.1017943  2.64970963 8.6996913 ]
```

## Example context
Using the `with stablerandom` context to get a stable output:
```python
import numpy.random
from stablerandom import stablerandom

with stablerandom:
    print(numpy.random.triangular(1, 5, 10, 3))
    print(numpy.random.triangular(1, 5, 10, 3))
>>> [5.1017943  2.64970963 8.6996913 ]
>>> [3.30538708 2.39427919 3.57653224]

with stablerandom:
    print(numpy.random.triangular(1, 5, 10, 3))
>>> [5.1017943  2.64970963 8.6996913 ]
```

## Installing
```bash
$ pip install stablerandom
```
The source code is currently hosted on GitHub at 
https://github.com/GistLabs/stablerandom
and published in PyPI at https://pypi.org/project/stablerandom/ 

The versioning scheme currently used is {major}.{minor}.{auto build number}
from `git rev-list --count HEAD`. 

We recommend picking a version like:

`stablerandom = "^0.5"`

## Dependencies
This library has been tested with [NumPy](https://www.numpy.org) back to version 1.22

## Community guidelines
We welcome contributions and questions. Please head over to github and 
send us pull requests or create issues!
test-guide-pytest-json 0.0.10
A pytest plugin to generate JSON reports, with ATX support.
Requires Python: >=3.10

## pytest-test-guide-json

A Python package to convert `pytest` test results into a **JSON format compatible with [test.guide](https://www.tracetronic.com/products/testguide/)** by TraceTronic.

## 📘 Overview

**test.guide** by TraceTronic is a powerful tool for managing and analyzing automated test results. However, it does **not natively support `pytest`** output.

This package bridges the gap by:

- Collecting test results from `pytest`
- Converting them into a structured JSON format
- Ensuring full compatibility with test.guide’s expected JSON schema

## 🚀 Features

- Easy integration with existing `pytest` test suites
- Generates test.guide-compatible JSON reports
- Captures test case hierarchy, verdicts (`PASSED`, `FAILED`, `ERROR`, `INCONCLUSIVE`, etc.), durations, and more
- Supports nested folder/test structures for proper grouping in test.guide

## 🧪 Example Usage

1. **Install the package**:
```bash
pip install test-guide-pytest-json
```
2. **Create a .env file in the root of your project to store metadata**:
```env
PROJECT_NAME=my_project
ECU_NAME=my_ecu
ECU_VERSION=0.0.1
```

3. **Run your tests with pytest**:
```bash
# Generate timestamped file in the project root
pytest --json

# Generate report at a custom path
pytest --json some/path/report.json

# Short option
pytest -J some/path/report.json

# Run tests normally (no report generated)
pytest
```
velatus 0.3.0
A Python library for masking sensitive information in logs.
Requires Python: >=3.8

# velatus

velatus is a Python library written in Rust for fast log masking/filtering of secrets.

It is useful when you have a lot of secrets to match, when a simple string-replace may not be performant.

## Basic usage

```python
import logging
import sys
import velatus

def main():
    secrets = ["secret1", "secret2"]
    logging.basicConfig(stream=sys.stdout, level=logging.INFO)
    velatus.mask_handlers(secrets, logging.getLogger().handlers)

    logging.info("Printing out secret1, secret2")

if __name__ == "__main__":
    main()
```
gives
```
INFO:root:Printing out [MASKED], [MASKED]
```

## Design

velatus consists of a `Masker` class which is callable and written in Rust using pyo3. It may be installed as a filter on a logging Handler with `addFilter`.

Under the covers, the `Masker` compiles the set of strings to a regular expression using the `regex` library, then substitutes all matches with the configured masking value.