Skip to main content

py-jsend

python jsend pypi: https://pypi.python.org/pypi/pyjsend/

https://travis-ci.org/onceaweeq/py-jsend.svg?branch=master https://badge.fury.io/py/pyjsend.svg

About jsend

http://labs.omniti.com/labs/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'}}

Metadata

Release files for pyjsend 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for pyjsend 0.2.2
File Interpreter ABI Platform Actions
pyjsend-0.2.2-py2.py3-none-any.whl Python 3, Python 2 none any Details for pyjsend-0.2.2-py2.py3-none-any.whl

Release files / pyjsend-0.2.2-py2.py3-none-any.whl

Download URL pyjsend-0.2.2-py2.py3-none-any.whl
Size 3.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
995139f3ba3150d99510c72281664987da65671d31418c39bcec1da7127c582e
BLAKE2b-256 checksum
How to use checksums
46e5faecdaa349dcbcc3be5e9376436fb76fc95946c5f0365f74c6a412e2d31f
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for pyjsend 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page