Skip to main content

This is a lightweight microframework for building restful APIs

Project description

Krull
=======================

This is a lightweight microframework for building restful APIs
::
from krull.handlers import route_handler
from krull.server import run_server


@route_handler(path='/users', method='GET')
def getusers(req, res):
res.status = 200
res.data = {"message": "Hello world!"}
return res


@route_handler(path='/users', method='POST')
def postusers(req, res):
# do something with data
res.status = 201
res.data = {"message": "success!"}
return res


if __name__ == '__main__':
run_server()

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

krull-0.0.1.tar.gz (1.4 kB view details)

Uploaded Source

File details

Details for the file krull-0.0.1.tar.gz.

File metadata

  • Download URL: krull-0.0.1.tar.gz
  • Upload date:
  • Size: 1.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for krull-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b6e4c694441b487c92a61c04d6a4ba4f94c2890a9506717c88c0fe40169fb64a
MD5 b1cd944151870adc4f04561550651264
BLAKE2b-256 ff7b1c02e2ad6b8e2fad8a5ea44f67097a99379a43bd6bfc2ac3aedfe876244f

See more details on using hashes here.

Supported by

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