semvec/pypi-packages huggingface dataset:
orwell-translator 1.0.0
Create translators for the Orwell platform
License: MIT

# Orwell Package For Building Translators

## About

Orwell is an open-source platform that allows you to integrate different metrics collectors into one large super-system, storing the data from different sources in Prometheus' format.
  
With that goal in mind, this package tries to facilitate as much as possible the task of creating translator services compatible with Orwell's architecture.

## Development

If a given service's output follows the scheme "```host```,```metric```,```value```", its translator could be built with the following example:

```
from orwell-translator import Metric, Runner


# The translator function should be able to receive multiple lines
# of the desired service output and return a list of Metric objects

def translate (lines: str) -> list[Metric]:
  metrics = [ line.split(',') for line in lines.split('\n') ]
  return [ Metric(metric, value, { 'host': host }) for host, metric, value in metrics ]


translator = Runner(translate)
translator.run()

```

## Usage

With the example given above we now have three options for running the service:

### Command-Line Mode
```python main.py cmd <output>```

The output will be processed and printed.


### Server Mode
```python main.py server```

A Flask server will start accepting POST requests for /metrics. 
The body of the request must be a dictionary with the only key ```metrics```.
The response will be the processed output whenever the status code is 200.

**Environment Variables**

```FLASK_HOST```
**Default** "localhost"

```FLASK_PORT```
**Default** "5000""

```FLASK_DEBUG```
If set the server will start in debug mode.

### Production Mode
```python main.py prod```

This is the most important mode as it allows to read messages from Kafka and write them to a Redis database, according to the Orwell's architecture.
  
  
**Environment Variables**

```REDIS_PASSWORD```
**Default** "root"

```KAFKA_HOST```
**Default** "localhost""

```KAFKA_PORT```
**Default** 9093

```KAFKA_TOPIC```
**Default** "telegraf"
adaptivefiltering-library 0.0.7
Community-contributed filter pipelines for adaptivefiltering
License: MIT

# adaptivefiltering-library

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![PyPI Release](https://img.shields.io/pypi/v/adaptivefiltering-library.svg)](https://pypi.org/project/adaptivefiltering-library)
[![Documentation Status](https://readthedocs.org/projects/adaptivefiltering/badge/)](https://adaptivefiltering.readthedocs.io/en/latest/libraries.html)

This repository contains community-contributed filter pipelines for the [adaptivefiltering](https://github.com/ssciwr/adaptivefiltering) project.
It is ditributed as a Python package through PyPI, which the `adaptivefiltering` Python package depends on.

*It is currently under construction, but already accepting contributions.*

## Contributing

If you want to contribute your filter pipelines to this repository, please read the [Contribution Guide](CONTRIBUTING.md).
spec2json 0.1.0
Extract section metadata and algorithm steps from specification HTML documents as JSON.
License: MIT
Requires Python: >=3.10,<4.0

# spec2json

> Extract section metadata and algorithm steps from specification HTML documents
> as JSON.

[![PyPI](https://img.shields.io/pypi/v/spec2json)](https://pypi.org/project/spec2json/)
![Python Version](https://img.shields.io/pypi/pyversions/spec2json)
[![License](https://img.shields.io/github/license/linusg/spec2json?color=d63e97)](https://github.com/linusg/spec2json/blob/main/LICENSE)
[![Black](https://img.shields.io/badge/code%20style-black-000000)](https://github.com/ambv/black)

## Installation

Install from PyPI:

```console
pip3 install spec2json
```

## Usage

See `spec2json --help`.

Example:

```console
spec2json --numbered https://tc39.es/ecma262/ https://tc39.es/ecma402/ > ecmascript.json
```

## Supported formats

- [Bikeshed](https://tabatkins.github.io/bikeshed/) (various Web specs),
- [Ecmarkup](https://tc39.es/ecmarkup/) (ECMAScript)
- [Wattsi](https://github.com/whatwg/wattsi) (HTML standard)
cascadecmsdriver 1.0.0
Simplify interaction with Hannon Hill's Cascade CMS 8 REST API
License: MIT

# Cascade CMS 8 REST API Python Driver

This is a module for simplifying interaction with [Hannon Hill's Cascade CMS 8 REST API](https://www.hannonhill.com/cascadecms/latest/developing-in-cascade/rest-api/index.html). This was built to handle some day-to-day task automation with Cascade CMS 8, e.g., access control management, workflow management, file naming rule enforcement, and more.

## How it Works

The driver class [CascadeCMSRestDriver](py-cascade-cms/driver.py) constructor accepts either a username and password combination or a user-specific API key (i.e., for a service account in Cascade CMS) in addition to an organization name, e.g. "cofc". From there, it uses these values to create some headers that are used in combination with the [requests](https://pypi.org/project/requests/) library to wrap requests against the Cascade CMS REST API in simple methods, like **list_sites**. The methods are based on [the API's WSDL description](https://my-org.cascadecms.com/ws/services/AssetOperationService?wsdl). (Replace my-org in the previous link with your own organization).

## Installation

To install the package, simply run:

```
pip install py-cascade-cms
```

## Usage

```
# you can provide a username and password or alternatively an api key
# verbose boolean indicates whether to use verbose logging
driver = CascadeCMSRestDriver(
    organization_name="my-org", api_key='my-api-key', verbose=True)
## driver = CascadeCMSRestDriver(
##    organization_name="my-org", username='my-username', password='my-password',
##    verbose=True)
##
sites = driver.list_sites()['sites']
for s in sites:
    asset = driver.read_asset(asset_type='site', asset_identifier=s['id'])
    driver.debug(asset)

```
py-cascade-cms 1.0.2
Simplify interaction with Hannon Hill's Cascade CMS 8 REST API
License: MIT

# Cascade CMS 8 REST API Python Driver

This is a module for simplifying interaction with [Hannon Hill's Cascade CMS 8 REST API](https://www.hannonhill.com/cascadecms/latest/developing-in-cascade/rest-api/index.html). This was built to handle some day-to-day task automation with Cascade CMS 8, e.g., access control management, workflow management, file naming rule enforcement, and more.

## How it Works

The driver class [CascadeCMSRestDriver](py-cascade-cms/driver.py) constructor accepts either a username and password combination or a user-specific API key (i.e., for a service account in Cascade CMS) in addition to an organization name, e.g. "cofc". From there, it uses these values to create some headers that are used in combination with the [requests](https://pypi.org/project/requests/) library to wrap requests against the Cascade CMS REST API in simple methods, like **list_sites**. The methods are based on [the API's WSDL description](https://my-org.cascadecms.com/ws/services/AssetOperationService?wsdl). (Replace my-org in the previous link with your own organization).

## Installation

To install the package, simply run:

```
pip install py-cascade-cms
```

## Usage

```
# you can provide a username and password or alternatively an api key
# verbose boolean indicates whether to use verbose logging
driver = CascadeCMSRestDriver(
    organization_name="my-org", api_key='my-api-key', verbose=True)
## driver = CascadeCMSRestDriver(
##    organization_name="my-org", username='my-username', password='my-password',
##    verbose=True)
##
sites = driver.list_sites()['sites']
for s in sites:
    asset = driver.read_asset(asset_type='site', asset_identifier=s['id'])
    driver.debug(asset)

```