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-reponse
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
service_response-0.1.tar.gz
(2.8 kB
view details)
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.tar.gz.
File metadata
- Download URL: service_response-0.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
220885d09bde697eacad46beca85fb4f9f9f4bbd98e183f431af385558bf381c
|
|
| MD5 |
d1806a1535d8f9b399a9a4e3d7a6df29
|
|
| BLAKE2b-256 |
4e591766c3085236a8e6748eb98c40128b1d1396ea8fe907c469259b61cccfee
|
File details
Details for the file service_response-0.1-py3-none-any.whl.
File metadata
- Download URL: service_response-0.1-py3-none-any.whl
- Upload date:
- Size: 3.2 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 |
bc6e6720008e196db9bbde7fa8bde868a0d8847aadaed2da10783ec951623369
|
|
| MD5 |
33048ec367955a7559f6f838f2c86045
|
|
| BLAKE2b-256 |
37c6656092eeabde873b0d729f820dece52ae6e3959bb9a9b5b7159841926a6c
|