semvec/pypi-packages huggingface dataset:
valence 0.9.0.dev301
Openstack Valence Project

=========================
Openstack Valence Project
=========================

********
Overview
********

Valence is a service for lifecycle management of pooled bare-metal hardware
infrastructure.  The concept of pooled storage (SSDs or nvmE) disaggregated
from compute nodes and network disaggregated from compute and storage
provides the flexibility to compose and uses as and when the cloud requires
more server resources. Valence provides the capability "compose" hardware nodes
and release resources as needed by the overcloud.

Valence supports Redfish as default management protocol to communicate
to hardware. It supports Rack Scale Design (RSD), Open architecture for management
of disaggregated server hardware resources, which is standardized in Redfish.
Valence also provides capability to manage other vendors disaggregated hardware
using their respective drivers other than Redfish.

:Free software: Apache license
:Wiki: https://wiki.openstack.org/wiki/Valence
:Source: http://git.openstack.org/cgit/openstack/valence
:Bugs: https://bugs.launchpad.net/openstack-valence
asyncserial 0.1.0
Asyncio wrapper for pyserial
Requires Python: >=3.5
Keywords: serial pyserial async asyncio

============================
Asyncio wrapper for pyserial
============================

.. image:: https://badge.fury.io/py/asyncserial.svg
   :target: https://badge.fury.io/py/asyncserial
   :alt: PyPI version

.. image:: https://img.shields.io/pypi/pyversions/asyncserial.svg
   :target: https://pypi.org/project/asyncserial/
   :alt: Python Versions

.. image:: https://readthedocs.org/projects/asyncserial/badge/?version=latest
   :target: http://asyncserial.readthedocs.io/en/latest/?badge=latest
   :alt: Documentation Status


`asyncserial` is a a wrapper for the `pyserial` library providing an async interface based on `async def` and `await`.


Installation
============

.. code-block:: sh
  pip install asyncserial


Documentation
=============
https://asyncserial.readthedocs.io


Examples
========
.. code-block:: python

   import asyncio
   from asyncserial import Serial

   loop = asyncio.get_event_loop()

   test_serial = Serial(loop, "/dev/ttyACM0", baudrate=115200)

   async def test():
       await test_serial.read() # Drop anything that was already received
       while True:
           line = await test_serial.readline() # Read a line
           print("[+] Serial read: {}".format(line))
           await asyncio.sleep(0) # Let's be a bit greedy, should be adjust to your needs


   asyncio.ensure_future(test())

   print("[+] Starting eventloop")
   loop.run_forever()
mail2mongo 0.3.3
Simple SMTP daemon which save incoming emails to MongoDB
Requires Python: >=3.5

# Info

Simple SMTP daemon which can save incoming emails to MongoDB and send it to WebSocket.

You should own domain name, MX record and nginx.

# Install

```bash
$ pip3 install mail2mongo
```

## Run

```bash
$ mail2mongo --help
usage: main.py [-h] [-m MONGO_URI] [-db DB_NAME] [-cn COL_NAME] [-ap API_PORT]
               [-sp SMTP_PORT] -d DOMAINS [DOMAINS ...]

Save incoming emails to mongodb

optional arguments:
  -h, --help            show this help message and exit
  -m MONGO_URI, --mongo MONGO_URI
                        Mongo URI (default: mongodb://localhost)
  -db DB_NAME, --db-name DB_NAME
                        Mongo data base (default: mail2mongo)
  -cn COL_NAME, --col-name COL_NAME
                        Mongo collection name (default: emails)
  -ap API_PORT, --api-port API_PORT
                        API port (default: 8080)
  -sp SMTP_PORT, --smtp-port SMTP_PORT
                        SMTPD port (default: 8025)
  -d DOMAINS [DOMAINS ...], --domains DOMAINS [DOMAINS ...]
                        Allowed domains (default: [])
```

Argument `-d/--domains` required! It's a domain names list which you own.

From python package

```bash
$ mail2mongo -d example.com -m mongodb://192.168.0.100:27017
```

From Docker image

```bash
$ docker run -p 8080:8080 -p 8025:8025 inn0kenty/mail2mongo -d example.com -m mongodb://192.168.0.100:27017
```

## nginx

File `/etc/nginx/nginx.conf` should contains:

```
mail {
    server_name <Your MX record>;

    auth_http <local ip:port>/nginx-auth;

    proxy_pass_error_message off;

    server {
        listen 25;
        protocol smtp;
        proxy on;
        smtp_auth none;
        xclient off;
    }
}
```

The MX record usually has the form `mail.example.com` where `example.com` your domain name. The `mail.example.com` must be resolved to your ip address.

Local ip:port - local ip address and port (api_port, default 8080).

## WebSocket

You can use WebSocket on `/ws` url. Also you should provide email address.

Example

```python
import asyncio
import aiohttp


async def main():
    async with aiohttp.ClientSession() as session:
        async with session.ws_connect('ws://127.0.0.1:8080/ws?email=foo@example.com') as ws:
            async for msg in ws:
                if msg.type == aiohttp.WSMsgType.TEXT:
                    print(msg.json())
                else:
                    break

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
```

You can get messages of two types:

If something go wrong:

```
{'type': 'error', 'payload': {'msg': 'Error message'}}
```

If you receive new email:

```
{'type': 'new_mail', 'payload': {'from': 'root@google.com', 'to': 'foo@example.com', 'subject': 'Foo bar', 'text': 'Some message', 'timestamp': '1970-01-01T00:00:00.000000+00:00', '_id': '5ae0988c754ea76f22935378'}}
```

`_id` - `ObjectId` in MongoDB.

Similar payload saved to MongoDB.

If for some reason MongoDB is down, service will continue try to save payload to mongo. At each next step service will be double sleep time (default is 60 seconds).
k8s-build-maps 0.0.9
Build a directory of Kubernetes ConfigMap/Secret manifests, inserting data from files.

k8s-build-maps
==============

Build a directory of Kubernetes ConfigMap/Secret manifests, inserting
data from files.

Example
-------

Given this directory:

-  example-manifests/

   -  configmaps/

      -  mymap.yaml
      -  mymap.yaml.files/

         -  file1
         -  file2

Where ``mymap.yaml`` looks like::

   apiVersion: v1
   kind: ConfigMap
   metadata:
     namespace: mynamespace
     name: something
     labels:
       mylabel: value

Running ``k8s-build-maps example-manifests example-manifests-built`` creates this
directory:

-  example-manifests-built/

   -  configmaps/

      -  mymap.yaml

Where ``mymap.yaml`` has the following content::

   apiVersion: v1
   kind: ConfigMap
   metadata:
     namespace: mynamespace
     name: something
     labels:
       mylabel: value
   data:
     file2: dGVzdDI=
     file1: dGVzdDE=

Installation
------------

::

   pip install k8s-build-maps

Usage
-----

::

   k8s-build-maps SOURCE [DEST] [--clean] [--no-clean] [-q/--quiet] [--debug]

Where:

- ``SOURCE``: Required. The source manifest directory.
- ``DEST``: Optional if present in build config (see below). The destination manifest directory.
- ``--clean/--no-clean``: Pass ``--clean`` to remove existing files in ``DEST`` before building the manifests. Defaults to ``--no-clean``.
- ``-q/--quiet``: Hide output.
- ``--debug``: Enable debug logging.

Config file
~~~~~~~~~~~

The ``SOURCE`` directory can have an optional ``.build-maps.yaml`` config
file. This may contain the following values:

-  ``dest``: ``DEST`` path, relative to ``SOURCE``. Can be overridden on
   the command line.
-  ``clean``: ``true`` or ``false``. Can be overridden on the command
   line by ``--clean/--no-clean``