semvec/pypi-packages huggingface dataset:
promql-parser 0.5.0
PromQL Parser for Python
License: MIT
Requires Python: >=3.8

# py-promql-parser

![CI](https://github.com/messense/py-promql-parser/workflows/CI/badge.svg)
[![PyPI](https://img.shields.io/pypi/v/promql-parser.svg)](https://pypi.org/project/promql-parser)

[promql-parser](https://github.com/GreptimeTeam/promql-parser) Python binding, a PromQL parser for Python.

## Installation

```bash
pip install promql-parser
```

## Usage

```python
import promql_parser

ast = promql_parser.parse('prometheus_http_requests_total{code="200", job="prometheus"}')
print(ast)
```

## License

This work is released under the MIT license. A copy of the license is provided in the [LICENSE](./LICENSE) file.
macrolibs 0.0.6
All of my macros in one place!
License: MIT
Requires Python: >=3.6

```commandline
pip install macrolibs
```

### Macros for type conversions, recursive search, file handling, etc...

-----------
### typemacros

```commandline
import macrolibs.typemacros
```
Includes:
- standardization of **unions**, **intersections**, and **compliments** for all base iterables
- `replace_value_nested` recursive find and replace for all nested data structures
- `maybe_arg` automatic function argument reduction (reductive polymorphism)
- `copy_type` functor with name cache for creating new types (also maps reflexive methods to new type)
- `maybe_type` attempts to apply type constructor
- `wrap_types` attempts to apply type constructor for specified types

*And more!*

-----------

### filemacros

```commandline
import macrolibs.filemacros
```
Includes:
- `get_script_dir` function to return the directory of the call location
  
 (this is different from `os.getcwd` as it will retun the location of the file
  making the function call)
 - `full_walk` returning full paths from `os.walk`

- `open_json` and `save_json` with default format option

---------

### misc

```commandline
import macrolibs.misc
```

Includes:
- `profile_run` A custom profiling function similar to cProfile.run() with enhanced formatting options.