A library for managing git repositories in a directory.
Project description
Service Response
It's a specialized, convenient and extremely lightweight response sample to use for inter-app communication.
Inspired by Ruby on Rails.
Install
As package:
pip install service-response
As module via (git clone):
git clone https://github.com/Armen-Jean-Andreasian/ServiceResponse # or SSH
Usage and features
from service_response import ServiceResponse
a = ServiceResponse(status=False, error="Some Error")
b = ServiceResponse(status=True, data={1: 2, 3: "content"})
for i in a, b:
if i: # checking status
print(i.data) # getting data
else:
print(i.error) # getting error msg
Params:
- status:
bool| The status of transaction - data:
Any(Optional) | The payload to return - error:
str(Optional) | The error content
Features:
__bool__: you can useif ServiceResponse()which will returnbooldepending on thestatus
License
Read the LICENSE file.
Everything ingenious is simple
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file service_response-0.1.2.tar.gz.
File metadata
- Download URL: service_response-0.1.2.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9833014176c00b2e61afef1efbe40ab7c8579c3b19a47d141e65c7ce7dfd05e
|
|
| MD5 |
ce14ce7e9bc66e29e83a829428c87a41
|
|
| BLAKE2b-256 |
5381d7e7dc34be2eeb838990aaf86b04496b927132a430bd04d3047eab108c48
|
File details
Details for the file service_response-0.1.2-py3-none-any.whl.
File metadata
- Download URL: service_response-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1dc70a99cb079b2bfaa6be3a826f27617fc122c062997b06a265018601da5a2
|
|
| MD5 |
a6d461475b4ba7a39d28c22f86286651
|
|
| BLAKE2b-256 |
aa4b8448c1aae905ad46e3af1d0ea56c11f803ae0109f126833acb29fd69d947
|