semvec/pypi-packages huggingface dataset:
pytracer 0.0.4
Prints function calls of the Python program
License: MIT

# PyTracer

Prints function calls of the Python program.

```console
$ cat example.py
def f(a):
    return g(a, "20")

def g(a, b):
    return b, a

f(10)
    
$ pytracer example.py
>example.<module>()
    >example.f(10)
        >example.g(10, '20') = ('20', 10)
    <example.f(10) = ('20', 10)
<example.<module>() = None
```

## Installing ##

`pip install pytracer`

## Usage ##

    pytracer.py [-h] [-s S] [-i I] [-f F] filename ...

    positional arguments:
      filename    a name of the Python program

    optional arguments:
      -h, --help  show this help message and exit
      -s S        max argument length to print (the default is 32)
      -i I        modules to ignore (comma delimited, the default is
                  re,glob,random,codecs,argparse)
      -f F        modules to focus at (comma delimited)

## Advanced Usage ##

If you want to trace a single function just add the trace() decorator. Also it is possible to ignore not interesting subcalls:

```python
import pytracer

@pytracer.no_trace()
def g():
    return 42

@pytracer.trace()
def f():
    return g()

f()
```

The module also can be used as a context manager:

```python
import pytracer

def f():
    return 42

with pytracer.trace():
    f()
```
hapool 0.0.1
A handy, customizable python library that provides high availability for multiple node connections
License: MIT
Requires Python: >=3.6.0

# pyhapool

A handy, customizable python library that provides high availability(including failover etc.) for multiple node connections.

## Install

```python
pip install hapool
```

## QuickStart

For example, we need to connect to multiple kubernetes apiserver.
```python
from pyhapool import HAEndpointPool
from kubernetes.client import ApiClient

# got configuration list which contain multiple apiservers
configuration_list = [...]
ha_pool = HAEndpointPool.from_list(configuration_list)


class HAApiClient(ApiClient):

    def call_api(self, *args, **kwargs):
        while ha_pool.data:
            with ha_pool.get_endpoint() as configuration:
                self.configuration = configuration
                return super().call_api(*args, **kwargs)
```

If any apiserver became unavailable (may raise some exceptions), `ha_pool` would switch to next endpoint until any available one been chosen(work like upstream in `nginx`).

----

more documentation is coming.