Any Python Library As A Service
Project description
Any Python Library As A Service (apylaas)
apylaas lets you host Python libraries behind a web service with a JSON API and a simple web UI. This can be useful for remotely executing Python code with some inputs or debugging code outside of a terminal. Read this post for details.
Installation
pip install apylaas
Usage
apylaas --help
apylaas --library some_module
Details
cat <<EOF > something.py
def say_hello(name: str) -> str:
return f"Hello {name}!"
EOF
apylaas --library something
# Visit http://localhost:5000/say_hello
# or use the API directly (both GET and POST are accepted)
curl -X POST -d '{"name": "someone"}' http://localhost:5000/say_hello
curl 'http://localhost:5000/say_hello?name=someone'
See examples/basic.py for a simple demo of hosting a function that takes in and returns strings. See examples/classifier.py for a simple PyTorch model server.
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
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 apylaas-0.1.1.tar.gz.
File metadata
- Download URL: apylaas-0.1.1.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08c9fd85336ca4679d8e2390815827f2ba0ece8cc951e964e2a4fb5a3862f855
|
|
| MD5 |
343b1c1caf8c095b5d44116e9f80ecff
|
|
| BLAKE2b-256 |
63b6f857a8388454f9428bd46dd895cc3b100ec7f98f1a4ce41d53c02db180c4
|
File details
Details for the file apylaas-0.1.1-py3-none-any.whl.
File metadata
- Download URL: apylaas-0.1.1-py3-none-any.whl
- Upload date:
- Size: 21.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b55bdcf1f34226abc54f5d8e5e4f2a53762f2f6f3a9ac84472fa8df7ce218e6f
|
|
| MD5 |
b79b3adcbf6ed2a5c3d8e2c2b2f80d39
|
|
| BLAKE2b-256 |
eaf5453d4efa30845821e7ea69623f0e20278304b3056f1b7eeaf9f86383c91b
|