apylaas 0.1.1

Creator: bradpython12

Last updated:

Add to Cart

Description:

apylaas 0.1.1

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.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.