A python jsend library
Project description
python jsend pypi: https://pypi.python.org/pypi/pyjsend/
About jsend
Install
pip install pyjsend
Usage
import module:
>>> import jsend
success:
>>> jsend.success({'key': 'value'})
{'status': 'success', 'data': {'key': 'value'}}
fail:
>>> jsend.fail({'key': 'value'})
{'status': 'fail', 'data': {'key': 'value'}}
error:
>>> jsend.error('message')
{'status': 'error', 'message': 'message'}
is success:
>>> jsend.is_success({'status':'success'})
True
is fail:
>>> jsend.is_fail({'status':'fail'})
True
is error:
>>> jsend.is_error({'status':'error'})
True
to json string and load jsend string:
>>> jsend.success({'key': 'value'}).stringify()
'{"status": "success", "data": {"key": "value"}}'
>>> jsend.loads(jsend.success({'key': 'value'}).stringify())
{u'status': u'success', u'data': {u'key': u'value'}}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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 pyjsend-0.2.2-py2.py3-none-any.whl.
File metadata
- Download URL: pyjsend-0.2.2-py2.py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.1 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/2.7.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
995139f3ba3150d99510c72281664987da65671d31418c39bcec1da7127c582e
|
|
| MD5 |
8b40f5583aabef392ee68ea9e0caa439
|
|
| BLAKE2b-256 |
46e5faecdaa349dcbcc3be5e9376436fb76fc95946c5f0365f74c6a412e2d31f
|