semvec/pypi-packages huggingface dataset:
ezoutlet 1.0
Command line tool and Python API for ezOutlet EZ-11b
License: MIT

ezoutlet
========

.. image:: https://travis-ci.org/jtpereyda/ezoutlet.svg?branch=master
    :target: https://travis-ci.org/jtpereyda/ezoutlet

.. image:: https://img.shields.io/pypi/v/ezoutlet.svg
    :target: https://pypi.python.org/pypi/ezoutlet

A Python script and API to reset devices using the ezOutlet EZ-11b.

Not associated with or endorsed by the creators of ezOutlet.

Install
-------

::

    pip install ezoutlet

Usage
-----

::

    python -m ezoutlet reset 192.168.1.12  # -t 10  # wait 10 seconds after reset
xcache 0.2
clean caches when needed
License: MIT

`XCACHE <https://pypi.python.org/pypi/xcache>`_
===============================================

It's like `lru_caches <https://docs.python.org/3/library/functools.html#functools.lru_cache>`_ but can be cleared automatically or via context managers.


Why?
----

`There are only two hard things in Computer Science: cache invalidation and naming things. <http://martinfowler.com/bliki/TwoHardThings.html>`_

-- Phil Karlton

So, caches are fairly easy, but their invalidation is kind of hard to get right.


What type of cache is used?
---------------------------

The default implementation is the lru_cache of the stdlib but you can drop in your own.


How?
----

Python features garbage collection aka. automatic memory management. Let's make use of it:

.. code:: python

    from xcache import cache_gen

    request_cache = cache_gen(lambda: request)  # default cache_impl=lru_cache


Here, we defined our own cache that needs the global request for invalidating the cache.
As soon as ``request`` is garbage-collected, the cached data is freed.

.. code:: python

    @request_cache()
    def fib(n):
        return fib(n-1) + fib(n-2) if n > 1 else 1


Here, we see how to decorate a function to work like a lru_cache.

Now, let's see how this works:

.. code:: python

    class Request(): pass

    request = Request()

    print(fib(10))
    print(fib(20))
    print(fib.cache_info())  # fib cache contains 2 items

    request = Request()      # invalidates all caches

    print(fib.cache_info())  # fib cache contains 0 items
    print(fib(10))
    print(fib(20))


Context Manager for more more control over cache invalidation
-------------------------------------------------------------

If you need more control, the context manager ``clean_caches`` is what you need:

.. code:: python

    from xcache import cached, clean_caches

    @cached()
    def fib(n):
        return fib(n-1) + fib(n-2) if n > 1 else 1

    with clean_caches():
        print(fib(10))
        print(fib(20))
        print(fib.cache_info())  # fib cache contains 2 items
    print(fib.cache_info())      # fib cache contains 0 items


You can even specify what object the caches should be attached to:

.. code:: python

    @cached()
    def fib(n):
        return fib(n-1) + fib(n-2) if n > 1 else 1

    with clean_caches(Request()) as request:
        print(fib(10))
        print(fib(20))
        print(fib.cache_info())  # fib cache contains 2 items
    print(fib.cache_info())      # fib cache contains 0 items


Can these context managers be nested?
-------------------------------------

Sure. At each entrance and and exit of each context, all associated caches are emptied.


Conclusion
----------

Good
****

- cache invalidation done easy
- works via garbage collection
- works via context managers
- works with Python2 and Python3

Bad
***

- unkown ;-)


Ideas are always welcome. :-)
li-pagador-boleto 2.1.4
Meio de pagamento usando boleto bancário
License: MIT

LI-Pagador-Boleto
=================

LI-Pagador-Boleto

## Versão:

[![PyPi version](https://pypip.in/version/li-pagador-boleto/badge.svg?text=versão)](https://pypi.python.org/pypi/li-pagador-boleto)
[![PyPi downloads](https://pypip.in/download/li-pagador-boleto/badge.svg)](https://pypi.python.org/pypi/li-pagador-boleto)


## Build Status

### Master

[![Build Status](https://travis-ci.org/lojaintegrada/LI-Pagador-Boleto.svg?branch=master)](https://travis-ci.org/lojaintegrada/LI-Pagador-Boleto)
[![Coverage Status](https://coveralls.io/repos/lojaintegrada/LI-Pagador-Boleto/badge.svg?branch=master)](https://coveralls.io/r/lojaintegrada/LI-Pagador-Boleto?branch=master)

### Pagador Reloaded

[![Build Status](https://travis-ci.org/lojaintegrada/LI-Pagador-Boleto.svg?branch=pagador-reloaded)](https://travis-ci.org/lojaintegrada/LI-Pagador-Boleto)
[![Coverage Status](https://coveralls.io/repos/lojaintegrada/LI-Pagador-Boleto/badge.svg?branch=pagador-reloaded)](https://coveralls.io/r/lojaintegrada/LI-Pagador-Boleto?branch=pagador-reloaded)
confirm 0.1.3
Simple Python configuration file management.
License: MIT

Confirm
=======

.. image:: https://api.travis-ci.org/louib/confirm.svg
  :target: https://travis-ci.org/louib/confirm
.. image:: https://img.shields.io/pypi/v/confirm.svg
  :target: https://pypi.python.org/pypi/confirm/

Simple Python configuration file management.

Confirm validates a configuration file (.INI or YAML format) against a YAML
configuration schema.

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

.. code:: bash

  $ pip install confirm


Example schema file
-------------------

.. code:: yaml

  "system":
      "name":
          "required": true
          "description": "Name of the system associated with the server."
          "type": "str"
  "http_server":
      "listen":
          "required": true
          "type": "str"
          "description": "Listening address of the HTTP server."
          "default": "localhost"
      "port":
          "required": true
          "type": "int"
          "default": 8088
          "description": "Port of the HTTP server."
  "threading":
      "initial_pool_size":
          "description": "Initial number of threads in the thread pool."
          "type": "int"
          "default": 10
      "maximum_pool_size":
          "description": "Maximum number of threads in the thread pool."
          "type": "int"
          "default": 100
          "deprecated": true


Usage
-----

.. code:: bash

  $ confirm validate examples/confirm.yaml project.conf
  Error   : Missing required section system.
  Error   : Missing required section http_server.
  Warning : Deprecated option maximum_pool_size is present in section threading!


Confirm can also be used for validation as a Python library:

.. code:: python

  from confirm.validator import validator_from_config_file
  ...

    result = validator_from_config_file(config_file_path, schema_file_path)
    result.validate()
    print(result.is_valid())


License
-------
MIT License.