Skip to main content

A Flask wrapper for easy RESTful api development

Project description

PythonWEB

A Flask wrapper for easy RESTful api development

Quickstart

import pythonweb

app = pythonweb.Server()

class ExampleException(Exception):
    codename = "ERR_EXAMPLE"
    verbose = "This is an example exception. The specified exception params would be here: {0} and here: {1}"
    code = 501

@app.api("/api/example", form=False) # form=true means that you can use this api route as a form handler
def example_endpoint(param1 : int, param2 : bool): # Type annotations are not used by the server
    if param2:
        raise ExampleException(param1, param2, "Param") # 501 {"error":"ERR_EXAMPLE", "message":[param1, param2, "Param"], "verbose":"This is an example..."}
    return {"some_json":param1+1}

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

highghlow-pythonweb-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

highghlow_pythonweb-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file highghlow-pythonweb-0.1.0.tar.gz.

File metadata

  • Download URL: highghlow-pythonweb-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for highghlow-pythonweb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0ceea1b40b14e6e111860a4bc14890b7f46d9690a34e49809dd4316a91d0409e
MD5 b1b95ccd6340521a4406e93232358874
BLAKE2b-256 650501a5de6b009d40a9dc011af4a38a0d2fa526d470aea9493021e831571252

See more details on using hashes here.

File details

Details for the file highghlow_pythonweb-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for highghlow_pythonweb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 72de03d5716bbbbb6bf01ed527b74006bd385ae9b8a7bd944bfefb6542599acd
MD5 943af96cbc80bc02b91095b5653bb4a4
BLAKE2b-256 d710462671a7110f466f8f6f4441ba4b829a7152830382f18a82bca2718f9554

See more details on using hashes here.

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