semvec/pypi-packages huggingface dataset:
swisspair 0.2.1
Python bindings for Swiss pairing algorithm for (not only) Magic: The Gathering.
Requires Python: >=3.9

# swisspair-python

A python client for https://github.com/karlosss/swisspair - algorithm to pair players according to the Swiss system (not only) for Magic: The Gathering 

## Requirements

- Linux, MacOS 13 (x86_64) or MacOS 14 (arm)
- Python 3.9+ 

## Installation

### Pip installation

- `pip install swisspair`

### Local build & installation

- Requirements: `pybind11`, `gcc`, `cmake`, `gmp`
- Clone the repository
- `python -m build`
- In your project, do `pip install <PATH_TO_THE_CLONED_REPOSITORY>`

### Docker image

You can also use `swisspair` through a dockerized HTTP API. Refer to https://github.com/karlosss/swisspair-python-http-api.

## Usage

For the details of the algorithm, refer to https://github.com/karlosss/swisspair.

A sample usage below. For all available parameters, please refer to [the interface file](https://github.com/karlosss/swisspair-python/blob/a6cc5011aea4942c7b5296947bbf64d317a3f75a/src/swisspair/interface.py).

```python
from swisspair import Player, create_matches

p1 = Player(id="P1", points=3, rank=1, can_get_bye=True, cannot_be_paired_against_ids={"P3"})
p2 = Player(id="P2", points=3, rank=2, can_get_bye=False, cannot_be_paired_against_ids=set())
p3 = Player(id="P3", points=0, rank=3, can_get_bye=True, cannot_be_paired_against_ids={"P1"})

players = [p1, p2, p3]

matches = create_matches(players)

print(matches)
```

## License

MIT, whatever it means. If you like this project, I would be happy for a star :)
vonage-verify-v2 1.1.4
Vonage verify v2 package
Requires Python: >=3.9

# Vonage Verify V2 Package

This package contains the code to use [Vonage's Verify v2 API](https://developer.vonage.com/en/verify/overview) in Python. This package includes methods for working with 2-factor authentication (2FA) messages sent via SMS, Voice, WhatsApp and Email. You can also make Silent Authentication requests with Verify v2 to give your end user a more seamless experience.

## Usage

It is recommended to use this as part of the main `vonage` package. The examples below assume you've created an instance of the `vonage.Vonage` class called `vonage_client`.

### Make a Verify Request

```python
from vonage_verify_v2 import VerifyRequest, SmsChannel
# All channels have associated models
sms_channel = SmsChannel(to='1234567890')
params = {
    'brand': 'Vonage',
    'workflow': [sms_channel],
}
verify_request = VerifyRequest(**params)

response = vonage_client.verify_v2.start_verification(verify_request)
```

If using silent authentication, the response will include a `check_url` field with a url that should be accessed on the user's device to proceed with silent authentication. If used, silent auth must be the first element in the `workflow` list.

```python
silent_auth_channel = SilentAuthChannel(channel=ChannelType.SILENT_AUTH, to='1234567890')
sms_channel = SmsChannel(to='1234567890')
params = {
    'brand': 'Vonage',
    'workflow': [silent_auth_channel, sms_channel],
}
verify_request = VerifyRequest(**params)

response = vonage_client.verify_v2.start_verification(verify_request)
```

### Check a Verification Code

```python
vonage_client.verify_v2.check_code(request_id='my_request_id', code='1234')
```

### Cancel a Verification

```python
vonage_client.verify_v2.cancel_verification('my_request_id')
```

### Trigger the Next Workflow Event

```python
vonage_client.verify_v2.trigger_next_workflow('my_request_id')
```