Skip to main content

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)

Source distribution for univoucher 2.0.1
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

Release history Release notifications | RSS feed

This release

2.0.1 This release

1 release file

2.0.0

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page