semvec/pypi-packages huggingface dataset:
xunitparser 1.3.4
Read JUnit/XUnit XML files and map them to Python objects

===========
xunitparser
===========

Description
-----------

xunitparser reads a JUnit/XUnit XML file and maps it to Python objects.
It tries to use the objects available in the standard ``unittest`` module.


Usage
-----

::

    import xunitparser
    ts, tr = xunitparser.parse(open('/path/to/unit.xml'))


``ts`` is a ``TestSuite`` class, containing ``TestCase`` classes.
``tr`` is a ``TestResult`` class.

You can change the classes used (though they probably would not work unless
they inherit from the ``xunitparser`` ones) by using your own
``xunitparser.Parser`` class and changing the ``*_CLASS`` variables.

Some helpful properties are added to the ``TestCase`` class::

    for tc in ts:
        print('Class %s, method %s' % (tc.classname, tc.methodname))
        if tc.good:
            print('went well...', 'but did not run.' if tc.skip else '')
        else:
            print('went wrong.')

For more, please read the source code - it is very minimal.
The classes also inherit from the `unittest`__ module so it is actually
a good reference of what you can do with ``xunitparser``.

__ http://docs.python.org/library/unittest.html


Changes
-------

+ 1.3.4

  - fix python 3 compatibility
  - main project URL change as maintainer changes

+ 1.3.0

  - Multiple results in a single TestCase are seen as one.
    The previous way was never validated by real-life examples.
  - Handle system-out / system-err at the testsuite level


Development
-----------

Contributions can be sent to https://gitlab.com/woob/xunitparser/
proxine 0.1.0
Proxy engine for Python.
Requires Python: >=3.7

# Proxine

Proxy engine for Python.


## Basic usage

Check proxies one by one:

```python
import requests
from proxine.sources import get_all

proxies = get_all()

for proxy in proxies:
    try:
        r = requests.get(
            "https://httpbin.org/ip",
            proxies={
                "http": proxy.to_string(),
                "https": proxy.to_string(),
            },
            timeout=5,
        )
        print("OK", proxy)
    except Exception:
        print("ERROR", proxy)
```
flask-replit-auth 1.1.1
Brings replit auth to flask.

# The Unofficial Replit Auth Flask Extension
Replit authentication is an amazing thing. This package provides an easy way to use it.
```python
from flask_replit_auth import replit_auth
from flask import request, Flask

app = Flask(__name__)
replit_auth(app)

@app.route("/")
def index():
  if request.user:
    return request.user['username']
  else:
    return 'Not logged in!'

if __name__ == "__main__":
  app.run(host='0.0.0.0')
```
Initialize replit auth on your app by calling ```replit_auth(app)```, after creating your flask app. To get information, call ```request.user```, which will either return ```None``` or a ```dict``` with the information.
# Replit Auth - Frontend
```js
var button = document.getElementById('login_with_replit');

if (location.protocol !== 'https:') {
  alert('Replit auth requires https!');
}

button.onclick = function() {
  window.addEventListener('message', authComplete);

  var h = 500;
  var w = 350;
  var left = (screen.width / 2) - ( w / 2);
  var top = (screen.height / 2) - (h / 2);

  var authWindow = window.open('https://replit.com/auth_with_repl_site?domain=' + location.host, '_blank', 'modal=yes, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left)

  function authComplete(e) {
    if (e.data !== 'auth_complete') {
      return;
    }

    window.removeEventListener('message', authComplete);

    authWindow.close();
    
    // Reload the page to get the credentials.
    location.reload();
  }
}
```
Usage:  
1. Apply the javascript code above to your website.  
2. Set the ```id``` of you login button to ```login_with_replit```.