No project description provided
Project description
AutoServer
AutoServer is a python library for making quick web UIs, it was originally made for HackEd 2023.
Example
from autoserver import AutoServer
app = AutoServer()
@app.addfunc
def TaxCalc(province: str, cost: float, taxrate: int):
"""
Computes the amount of tax on an item given the tax rate
:param province: The name of the province
:param cost: The cost of the item expressed in dollars
:param taxrate: The tax rate expressed as a percentage
:return:
"""
tax = cost * float(taxrate) / 100
output = f"The tax in {province} for an item worth ${cost} is {tax}."
output += f"The total cost is ${cost + tax}."
return output
@app.addfunc
def TargetPrice(province: str, targetcost: float, taxrate: int):
targetRatio = 1.0 + float(taxrate) / 100
output = f"To have a final cost of ${targetcost} in {province},"
output += f"the pretax price should be ${targetcost / targetRatio}"
return output
app.run()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
autoserver-0.1.0.tar.gz
(3.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autoserver-0.1.0.tar.gz.
File metadata
- Download URL: autoserver-0.1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.7 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40f0390bacd3a3ecff53f8e8f75aea94ef79174b8dd66bf12aabc0efe3ef2edd
|
|
| MD5 |
666638d742337247bad917fce198a8d8
|
|
| BLAKE2b-256 |
de1aa9dd669f48e67fc387b1bc420688d7d182c80912d36d971aaf77175c1338
|
File details
Details for the file autoserver-0.1.0-py3-none-any.whl.
File metadata
- Download URL: autoserver-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.10.7 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6aad14518374b7ed7066925c4a45b594924d0568a24cae44e6fdbb0bcb3d73f
|
|
| MD5 |
295d1004545cb633bf89f2d21ea5de02
|
|
| BLAKE2b-256 |
ab4a717cf88e7e52a3109b1467f3bc8f64ecbe3fb93569dcd359db80451d0002
|