Touch-Callable
The web framework for less serious application.
Automatically generate a Web UI for Python function using type annotations.
English | 简体中文
Support platforms
- macOS
- Ubuntu
- Windows
Installation
Only support Python 3.6!
pip install -U touch-callable
Supported parameter value types
- str
- int
- float
- bool
- datetime.datetime
- datetime.date
- datetime.time
- enum.Enum
- io.BytesIO
- typing.BinaryIO
Supported return value types
- All objects that can be
json.dumps open('filename.xxx', 'rb'), return values' annotation should beio.BufferedReader
CommandLine args
--host
Default is 127.0.0.1, you can only visit it on your computer.
If you want to listen all networks:
$ touch-callable example.py --host 0.0.0.0
--port
Default is 6789.
--debug enable Flask debug feature(not recommend)
Default is False, if you want to enable it
$ touch-callable example.py --debug True
Screenshot
callables
Examples
All support types
# example.py
from datetime import datetime, date, time
from enum import Enum
import io
import typing
class Languages(Enum):
Python = 'Python'
PHP = 'PHP'
Java = 'Java'
def demo(int_: int, str_: str, float_: float, bool_: bool,
enum_: Languages,
datetime_: datetime = datetime.now(),
date_: date = date.today(),
time_: time = time(1, 2, 3),
bytes_io: io.BytesIO = None,
binary_io: typing.BinaryIO = None):
pass
$ touch-callable example.py
Return file
import io
def return_file() -> io.BufferedReader:
return open('filename', 'rb')
Stargazers
Metadata
Release files for touch-callable 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| touch-callable-0.1.0.tar.gz | 1.8 MB | Without provenance | Details for touch-callable-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| touch_callable-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for touch_callable-0.1.0-py3-none-any.whl |
Total release size: 3.6 MB
Release files / touch-callable-0.1.0.tar.gz
| Download URL | touch-callable-0.1.0.tar.gz |
|---|---|
| Size | 1.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f9cb6e7fc64348c6789729acef5800974b39a673d485de748c517580655b5ef
|
|
BLAKE2b-256 checksum How to use checksums |
22cb88b239d52c350056d4956ccbe398fe5bcf6a7ab4850cd32cee5ab6d9072b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.6.12
|
Release files / touch_callable-0.1.0-py3-none-any.whl
| Download URL | touch_callable-0.1.0-py3-none-any.whl |
|---|---|
| Size | 1.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7406f0597d068b68b410b718cb9a634ad57e00b18c69c48070fc82ecaa04a23b
|
|
BLAKE2b-256 checksum How to use checksums |
e1bcee997417cebb0338e376523ef88b58b08c0ccd1a997e06db09c971b0f9d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.6.12
|
Security for touch-callable 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.