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(request):
return arkhos.json({
"greeting": f"Hello {request.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 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/ | |
| 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 |
| Communicate | |
| arkhos.email(to_email, subject, message) | Send an email |
| arkhos.sms(phone_number, message) | Send an sms |
| Environment Variables | |
| arkhos.env(environment_variable) | Not implemented |
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
arkhos-0.0.9.tar.gz
(9.9 kB
view details)
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
arkhos-0.0.9-py3-none-any.whl
(11.5 kB
view details)
File details
Details for the file arkhos-0.0.9.tar.gz.
File metadata
- Download URL: arkhos-0.0.9.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55335f4e992dccda245052176518634b4c5e90739995e513132b9cff1ba14bc9
|
|
| MD5 |
f11603dbc614a71e5f8dfc96315f336c
|
|
| BLAKE2b-256 |
1e08247737f602325e0074dc7015a9fd16cac0e5f8f0e7c04b0c73101910557b
|
File details
Details for the file arkhos-0.0.9-py3-none-any.whl.
File metadata
- Download URL: arkhos-0.0.9-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ec8608c92264cdddaffc1ca922916a4cece42ec472c7a0af38389ccaf1aaf38
|
|
| MD5 |
1d3f6483db0906fdd816998bc30b9c68
|
|
| BLAKE2b-256 |
ac4a3bb40892f470199b3fbd26fd8cf69c0436813bfd3c3717cbe5a7ceae03ed
|