Skip to main content

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


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.8.tar.gz (9.1 kB view hashes)

Uploaded Source

Built Distribution

arkhos-0.0.8-py3-none-any.whl (10.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page