semvec/pypi-packages huggingface dataset:
uparallel 0.1.0
uparallel - oversimplified helper for easy parallel functions execution 

# uparallel
μparallel - oversimplified helper for easy parallel functions execution

Yes, it's oversimplified:

```python
from uparallel import uparallel
import requests

@uparallel(3)
def wikipedia(word):
    return requests.get(f"https://www.wikiwand.com/en/{word.capitalize()}")

results = [wikipedia(word) for word in 'fork spoon spork knife cup home'.split()]
for line in results:
    print(line.url, line.status_code)
```

So, `unparallel(num)` is a wrapper for any function to execute `num` of them in parallel.
There's three limitations:

1. It will wait until last of calls finish their execution
2. It will break on any execption, so catch it inside the function
3. Returned result is a thin wrapper, not result of function itself.

Last one need more explanation. Instead of result of function you will got a special proxy object. It will behave more or less like your normal object (like in this example with `requests`). If it's not, call `result.wait()` or even just `result()` instead of just `result`.

```python
@uparallel(2)
def add2(x):
    return x+2
	
results = [add2(x) for x in range(10)]
for y in results:
	print(y()-2, y)
```

And don't afread to read the code, it's less than 100 lines long.
uxml 0.3.0
uRPC is oversimplistic stream XML parser

# μXML - xml stream parsing in less than 100 lines of code

μXML is oversimlified way to parse large (or slow loading) XML lines with easy way for tag matching and callbacking.
No dependencies (besides python3.4+) and only one class `uxml.Parser` inside the library.

```python
import uxml
p = uxml.Parser(open('test.rss'))
p.find('/rss/channel/item', lambda e: print(e))
p.start()
```

First meaningful line is parser's object creation. The only parameter is file (or any other `io.TextIOWrapper` compatible) object.
`.find` method add new tag matcher for parser. First argument is a pointer to tag which we want to find inside xml stream.
I use nanoxpath notation (i.e. you should show full path to this tags or use `//` as a starting symbol).
Second argument of `find` is a callback which will be invoked if given tag is found and the only argument for this callback is a internal structure of tags and attributes inside this tag. Attributes can be separated from children tags by name, it's always starts with '@' symbol.
If tag is just one internal text - it will be returned as result. If there's more than one children with same name, it will be returned as list of tags. If tag have both internal text and attributes, first will be added to attributes as '#text'.

You can use unlimited number of `find`'s.
Parsing will start with `start` method. Example above will print every item inside given rss file.
Let me show you a little bit more complicated stuff.

```python
res = []
p = uxml.Parser('test.rss')
p.find('//link', lambda x: res.append(x)).find('//description', lambda x: print(x)).start()
```

First off all you can notice what `find` and `start` calls are chainable.
Trailing `/` will convert to any number of previous tags, so this time we will got list of links at `res` variable.
Also we just pass 'test.rss' filename to Parser constructor. It's not only open this file but also trying to guess XML encoding (very poorly but anyway).