semvec/pypi-packages huggingface dataset:
envargs 0.2.1
Parsing and validation of environment variables
License: MIT

Envargs
========

.. image:: https://travis-ci.org/cknv/envargs.svg?branch=master
    :target: https://travis-ci.org/cknv/envargs

.. image:: https://coveralls.io/repos/github/cknv/envargs/badge.svg?branch=master
    :target: https://coveralls.io/github/cknv/envargs?branch=master

Simple means of parsing and validating environment variables. Heavily inspired by the earlier versions of webargs, which also explains the name to some extend.

Installing
----------

.. code-block:: shell

    $ pip install envargs

Using
-----

.. code-block:: python

    from envargs import Var, parse_env

    required_vars = {
        'A_INT': Var(
            use=int,
            validate=lambda x: x >= 0,
        ),
        'A_LIST': Var(
            use=lambda x: x.split(','),
            validate=(
                lambda x: len(x) == 2,
                lambda x: x[0] == 'first element',
            ),
        ),
        'A_STR': Var(
            use=str,
            load_from='SOME_OTHER_NAME',
            validate=bool,
        ),
    }

    parsed = parse_env(required_vars)

Say you want to configure your Flask app using this:

.. code-block:: python

    app.config.from_mapping(parsed)

Why reinvent the wheel again?
-----------------------------

To be fair there are many good packages out there to parse environment variables, quite a few of them in python too. So this package can easily be seen as redundant. However, with separation of parsing and validation into two separate functions, you gain more power to control what is actually accepted, not to mention that it makes it possible to inline a few more things, as you can most often get away with using builtin functions for most parsing and validation, and when that is not enough, lambdas or partials can do the rest.
drf-channels 0.1.1
Simple Resource binding and Consumer Mixin for Django Rest Framework and Channels 2
License: MIT

DRF Channels
------------

.. image:: https://travis-ci.org/iamriel/drf-channels.svg?branch=master
    :target: https://travis-ci.org/iamriel/drf-channels

DRF Channels provides a simple django-channels bindings and consumer
mixin that can be used to automatically listen and send to groups
everytime a Resource is created/updated/deleted.

It requires Python >= 3.5, Channels >= 2.0, Django >=1.11, and Django Rest Framework 3.x

This is like a port of Channels 1.x's `Data_Binding <https://channels.readthedocs.io/en/1.x/binding.html>`__
and `Channels API <https://github.com/linuxlewis/channels-api/blob/master/README.rst>`__
with few differences.

The data sent to the clients are based on the Serializer class
provided.


How does it work?
-----------------

The API exposes a ``ResourceBinding`` class that holds your Model, Serializer class, and Consumer class.
Your Consumer class needs to be a subclass of ``AsyncJsonWebsocketConsumer`` from channels and
have a ``AsyncConsumerActionMixin`` mixin.

The ``ResourceBinding`` class binds ``pre_save``, ``pre_delete``, ``post_save``, and ``post_delete`` signals
to your model.  These signals will then send to the corresponding Consumer groups that listens to your stream.

The first thing you need to do is connect to your consumer and pass the actions you want to subscribe to
via url parameters.

For example, you want to subscribe to the create and update actions ``Job`` Resource (Model),
and the channels route is `/jobs/`, You will connect to the websocket like below,
if you are using `Channels Websocket Wrapper <https://channels.readthedocs.io/en/latest/javascript.html>`__:

.. code:: javascript

   const webSocketBridge = new channels.WebSocketBridge()
   webSocketBridge.connect('/jobs/?subscribe=create,update')


You then need to add a listener on your webSocketBridge to receive the messages sent by the Consumer
via signals.

.. code:: javascript

   webSocketBridge.socket.addEventListener('message', function(event) {

   })
naivepyrunner 0.2.0
Naive timed execution of custom handlers in multiple threads
License: MIT
Requires Python: >=3.5
Keywords: schedule scheduling cron timing parallel

# Naive Python Runner
## What does it do?
naivepyrunner is library to schedule a small amount of timed tasks that may need to perform repeatedly. It does not claim to always choose the right execution order of those tasks to minimize the overall delay if it is running under limited ressources, but it does try to do so.

## How does it work?
## Why is it naive?
The runner assumes that the list with yet to execute tasks does not change while calculating the optimal position for the task. This may lead to not optimal positioning

# Installation
Install it via `pip`:
``` bash
pip install naivepyrunner -U
```

Clone this repo and build it yourself:
``` bash
  pip install wheel -U

  # clone via https
  git clone https://github.com/henningjanssen/naivepyrunner.git
  # or via ssh
  git clone git@github.com:henningjanssen/naivepyrunner.git

  cd naivepyrunner

  # install via pip
  pip install .
  # or register as developed package
  python setup.py develop
  # or build the package and place it with your packages
  make
```

## Docker
Build it
``` bash
# build it yourself
docker build -t naivepyrunner .
docker run -v$PWD:/app naivepyrunner python myapp.py
# or use the prebuilt container
docker run -v$PWD:/app henningj/naivepyrunner python myapp.py
```

Extend your Dockerfile:
```Dockerfile
FROM henningj/naivepyrunner:latest
[...]
python myapp.py

```
# Usage

# License