Skip to main content

No project description provided

Project description

EResponse

This is a simple package to form json response easily.

Usage

from eresponse import new_success_message, new_error_message

def example():
    try:
        res = {
            "key": 1
        }
        return new_success_message("Success text", test=res)
    except Exception as e:
        return new_error_message("Error text")

What it looks like in response

Success

{
  "ok": true,
  "message": "Success text",
  "test": {
    "key": 1
  }
}

Error

{
  "ok": false,
  "error": "Error text"
}

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eresponses-1.0.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

eresponses-1.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file eresponses-1.0.tar.gz.

File metadata

  • Download URL: eresponses-1.0.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for eresponses-1.0.tar.gz
Algorithm Hash digest
SHA256 ea820fa61a4eb2bbf184561829fd8051d3e63ae6c9e1c29b4a50b486fde0e2d0
MD5 48274ccb33c4ea008c4d8b88c6115e59
BLAKE2b-256 acdabbdf9fa2935e1134c73869396533441f697ff70d4a514039a65a860980f5

See more details on using hashes here.

File details

Details for the file eresponses-1.0-py3-none-any.whl.

File metadata

  • Download URL: eresponses-1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for eresponses-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 715ff0ebc9c87b14dfafabedce8670575f50a59f0b2d6754716bcddd0a54e716
MD5 28a914d1eccd814be4645714a650596c
BLAKE2b-256 eed26da636574ff11bc4be589867a99e86821f6fc55a1441a5951467c215acfa

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