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.
Metadata
Release files for apylaas 0.1.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 | Provenance | |
|---|---|---|---|---|
| apylaas-0.1.1.tar.gz | 20.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| apylaas-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.9 kB
Release files / apylaas-0.1.1.tar.gz
| Download URL | apylaas-0.1.1.tar.gz |
|---|---|
| Size | 20.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
08c9fd85336ca4679d8e2390815827f2ba0ece8cc951e964e2a4fb5a3862f855
|
|
BLAKE2b-256 checksum How to use checksums |
63b6f857a8388454f9428bd46dd895cc3b100ec7f98f1a4ce41d53c02db180c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.13
|
Release files / apylaas-0.1.1-py3-none-any.whl
| Download URL | apylaas-0.1.1-py3-none-any.whl |
|---|---|
| Size | 21.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b55bdcf1f34226abc54f5d8e5e4f2a53762f2f6f3a9ac84472fa8df7ce218e6f
|
|
BLAKE2b-256 checksum How to use checksums |
eaf5453d4efa30845821e7ea69623f0e20278304b3056f1b7eeaf9f86383c91b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.13
|
Security for apylaas 0.1.1
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.