Example
from univoucher import models, local
from getpass import getpass
import math
netloc = input("Netloc: ") # <host>:<port>
username = input("Username: ")
password = getpass("Password: ")
client:models.Client = local.Client(netloc, username, password)
client.verify = False
# Create one voucher
# A guest can use it for 1000 minutes when redeemed
# The voucher can be redeemed an unlimited amount of times
vouchers = client.fetch(amount=1, duration=1000, uses=math.inf)
unlimited_uses_voucher:models.Voucher = next(vouchers)
print(unlimited_uses_voucher.code)
Metadata
Release files for univoucher 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| univoucher-2.0.1.tar.gz | 2.8 kB | Details |
Release files / univoucher-2.0.1.tar.gz
| Download URL | univoucher-2.0.1.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
674b94821c29d7e59c10d020cb614d28214b747922d29ed248731035d5449978
|
|
BLAKE2b-256 checksum How to use checksums |
bf67eb132468067345eb290e6cfba1696f9a4d23cd6ba51d74bd1b793cd80ecf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.23.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
|