apylaas-0.1.1
توضیحات
Any Python Library As A Service
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | apylaas-0.1.1 |
| نام | apylaas |
| نسخه کتابخانه | 0.1.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/apylaas/ |
| مجوز | MIT |
# 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](https://goatmobile.github.io/blog/posts/apylaas/) for details.
## Installation
```bash
pip install apylaas
```
## Usage
```bash
apylaas --help
apylaas --library some_module
```
### Details
```bash
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`](examples/basic.py) for a simple demo of hosting a function that takes in and returns strings. See [`examples/classifier.py`](examples/classifier.py) for a simple PyTorch model server.
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7.* | Python |
نحوه نصب
نصب پکیج whl apylaas-0.1.1:
pip install apylaas-0.1.1.whl
نصب پکیج tar.gz apylaas-0.1.1:
pip install apylaas-0.1.1.tar.gz