From 7e0fd558a39c29ef7f88abafa7838d708aeaad32 Mon Sep 17 00:00:00 2001 From: Israel Abraham Date: Mon, 28 Feb 2022 14:28:23 +0100 Subject: [PATCH] Update version to v0.0.2 --- build/lib/rest_api_payload/__init__.py | 38 +++++++++++++++++++ dist/rest_api_payload-0.0.2-py3-none-any.whl | Bin 0 -> 3983 bytes dist/rest_api_payload-0.0.2.tar.gz | Bin 0 -> 4146 bytes rest_api_payload.egg-info/PKG-INFO | 2 +- rest_api_payload.egg-info/SOURCES.txt | 1 - 5 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 build/lib/rest_api_payload/__init__.py create mode 100644 dist/rest_api_payload-0.0.2-py3-none-any.whl create mode 100644 dist/rest_api_payload-0.0.2.tar.gz diff --git a/build/lib/rest_api_payload/__init__.py b/build/lib/rest_api_payload/__init__.py new file mode 100644 index 0000000..a51694c --- /dev/null +++ b/build/lib/rest_api_payload/__init__.py @@ -0,0 +1,38 @@ +def error_response(status, message): + """ + Custom error response + + Args: + status ([string]): [status message -> 404 not found, 500 server error, 400 bad request, etc] + message ([string]): [what error message do you want to show to the end user?] + + Returns: + [response]: [Returns a dictionary of status, and message] + """ + + payload = { + "status": status, + "message": message + } + return payload + + +def success_response(status, message, data): + """ + Custom success response + + Args: + status ([string]): [status message -> 201 created, 200 ok, 202 accepted, etc] + message ([string]): [what message do you want to show to the end user?] + data ([dict]): [serialized data from the server side] + + Returns: + [response]: [Returns a dictionary of status, message, data of whatever object that was serialized] + """ + + payload = { + "status": status, + "message": message, + "data": data + } + return payload diff --git a/dist/rest_api_payload-0.0.2-py3-none-any.whl b/dist/rest_api_payload-0.0.2-py3-none-any.whl new file mode 100644 index 0000000000000000000000000000000000000000..c48b2057afe33c40c1f231e90d7bc658be33708a GIT binary patch literal 3983 zcma)2B@s>}G8TMk3L!Xm2D^#NEFR{ux3lMjtd?$#VEQ zl6e%4q!OIFeq?qWL-8P9YLI-xSSXGg z8lF>b6*2mRC(!}8ZIX^ENg7C*>b%yY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{CI# z@VrneP=-tJj;TMZ-c}v;(Ccs2u0my(ReoIf`J{r z%^m5C@dfx!XmM{pq_ZJW?3Iz7dCqyzwOuympXI*7tc&4-|yhz>Z-bMwFIJ; zXSgyTau(;1|5OWm)l`pIP}N4lzvA2!6A#H`d#;n`Tn0heifo4*AlPdXqaNz4xeJzx zn!&R&{51rSx*WYKXiRHl#1@=R999LLV{A12)=%N{)3tB$MQ$wztEg>BB3m9K5RH5A zOD*gjbxWs)?3yxycZ6Y!X5nqjR`+HsNBJ(-be80(FDxGOeMwLL=lmKrL=u}r_NAB2 zwB}7w(b{!2BP6%fuD8Lr{a0L6YpmolJdpWykKwheRt=Ei&WVSviTG1E9+U>qQEA81 zpW1e#;^>1H4KTIOuY|n}wUV^bI|%OWD`)n$ny1wKsA+H)ucoCd!;ee!HPViIn-n(< zmK7xk240=g3Vz(58R1btx0){Gq}Dw2Vx;P$vTF1#P8t122{}(aWU@ILj>z?(Bo~-S z|L^E^_W%F+)Q0`}`fow(f0O=GPWTrG0H_ViJ!|fH(tk@0=gH@7++XDTXPM;xCI649 zJC8jtyT7o%sD1F==rr5Zgb@XQbc0OV&2 Ma3(l^+CNYK0P2O?)c^nh literal 0 HcmV?d00001 diff --git a/dist/rest_api_payload-0.0.2.tar.gz b/dist/rest_api_payload-0.0.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..b523e2d0d7931542e25b48ae3405807443f510a2 GIT binary patch literal 4146 zcmaKucRbV&{Kt)qbVO!{tZdHS<78GwX3CKfhs>Ojj?TOzy0dro2w6EP0H{kJsb%e*O1){qg2Ypr_yK<8h$^0^AURj?Vs`j{eS}-hR%m z(y|a)h&&|FIe=n|7Zw1%^Np}=RhoUZG>(>1*CWb7Gg{b{B_oo;wN9@{hsHq%ciMDO z|Hb5(2^syV|HczseYVXI_vIvEO^sTR!H9!HdOB&)-9|h-N&C2|vpo+1_Xm0!bqqg; z6SBWJzc@8npEQBwA}Jjo{h=u4ch$ZREcC_9e09Q<4;fGD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