Python framework for deploying small apps
Project description
The Arkhos Python Client
Arkhos is a Python framework for easily deploying small Python apps.
# main.py
def arkhos_handler(event):
return arkhos.json({
"greeting": f"Hello {event.GET.get("name")}!"
})
$ git add main.py
$ git push arkhos
$ curl "https://my-first-app.arkhosapp.com?name=Wally"
{
"greeting": "Hello Wally!"
}
Docs
See the full Arkhos Docs and Getting started guide
Arkhos Requests | Description |
---|---|
request.method | GET, POST, INTERVAL, EMAIL, …. |
request.GET request.GET["some_key"] |
Request GET parameters, dictionary eg. ?favorite_project=arkhos |
request.body | Request body, string |
request.json | Request POST body parsed as json into dictionary |
request.headers | Request headers, dictionary |
request.path | The url path, string, eg. "/about" |
Arkhos Responses All responses also accept headers={} and status=200,404 |
|
return arkhos.json( {"key":"value"} ) |
Return JSON |
return arkhos.http( <h1>some html</h1> ) |
Return HTML |
return arkhos.render( "path/to/file.html", {"name": "Lucille"} ) |
Return the html with the variables in the dict. Uses jinja templating. Eg. in your HTML {{ name }} |
Static files (.js, .css, .jpg) | |
Any files in /static folder are available at <my-app>.arkhosapp.com/static/ | Not implemented |
Key/Value and Storage | |
arkhos.set(key, value) | Store a key, value. key should be a string. value can be string,int,float, or boolean |
arkhos.get(key) | Get a key |
arkhos.event(type, payload, resource) | Not implemented |
Communicate | |
arkhos.email(email_address, subject, message, attachment) | Not implemented |
arkhos.sms(phone_number, message) | Not implemented |
Environment Variables | |
arkhos.env(environment_variable) | Not implemented |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
arkhos-0.0.7.tar.gz
(9.0 kB
view hashes)
Built Distribution
arkhos-0.0.7-py3-none-any.whl
(10.4 kB
view hashes)