.. image:: https://pypip.in/version/jsobject/badge.svg
:target: https://pypi.python.org/pypi/jsobject/
:alt: Latest Version
.. image:: https://pypip.in/download/jsobject/badge.svg
:target: https://pypi.python.org/pypi/jsobject/
:alt: Downloads
.. image:: https://pypip.in/py_versions/jsobject/badge.svg
:target: https://pypi.python.org/pypi/jsobject/
:alt: Supported Python versions
.. image:: https://pypip.in/license/jsobject/badge.svg
:target: https://pypi.python.org/pypi/jsobject/
:alt: License
.. image:: https://pypip.in/status/jsobject/badge.svg
:target: https://pypi.python.org/pypi/jsobject/
:alt: Development Status
jsobject: Objects for Humans
============================
jsobject is simple implementation JavaScript-Style Objects in Python. It is distributed as a single file module and has no dependencies other than the `Python Standard Library <http://docs.python.org/library/>`_.
Homepage and documentation: https://mavier.github.io/jsobject
Example: "Hello World" with jsobject
------------------------------------
.. code-block:: python
from jsobject import Object
data = {
"boolean": True,
"null": None,
"number": 123,
"objectA": {'a': 'b', 'c': {'d': 'e', 'f': {'g': 'h'}}}
}
jso = Object(data)
print(jso.boolean) # True
print(jso.null) # None
print(jso.number) # 123
print(jso.objectA) # {'a': 'b', 'c': {'d': 'e', 'f': {'g': 'h'}}}
print(jso.objectA.a) # b
print(jso.objectA.c.d) # e
print(jso.objectA.c.f.g) # h
Download and Install
--------------------
Install the latest stable release with ``pip install jsobject``, ``easy_install -U jsobject`` or download `jsobject.py <https://github.com/mavier/jsobject/raw/master/jsobject.py>`__ (unstable) into your project directory. There are no hard dependencies other than the Python standard library. Jsobject runs with **Python 2.6+ and 3.x**.
Testing
_______
To run the tests use the `nosetest`.
.. image:: https://travis-ci.org/mavier/jsobject.png?branch=master
:target: https://travis-ci.org/mavier/jsobject
.. image:: https://coveralls.io/repos/mavier/jsobject/badge.png
:target: https://coveralls.io/r/mavier/jsobject
License
-------
Code and documentation are available according to the `MIT License <https://raw.github.com/mavier/jsobject/master/LICENSE>`__.
https://docs.python.org/3/library/json.html
https://docs.python.org/2/library/functions.html
https://docs.python.org/2/library/collections.html
https://docs.python.org/2/library/json.html
Raw data
{
"_id": null,
"home_page": "http://mavier.github.io/jsobject",
"name": "jsobject",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "jsobject,Object,json,chain,javascript",
"author": "Marcin Wierzbanowski",
"author_email": "marcin@wierzbanowski.com",
"download_url": "https://files.pythonhosted.org/packages/51/7a/b1cf5c38d33535b8788f5b0d873dab0e3d38051ad8a26623d8653a29e56f/jsobject-0.10.2.tar.gz",
"platform": "any",
"description": ".. image:: https://pypip.in/version/jsobject/badge.svg\n :target: https://pypi.python.org/pypi/jsobject/\n :alt: Latest Version\n\n.. image:: https://pypip.in/download/jsobject/badge.svg\n :target: https://pypi.python.org/pypi/jsobject/\n :alt: Downloads\n\n.. image:: https://pypip.in/py_versions/jsobject/badge.svg\n :target: https://pypi.python.org/pypi/jsobject/\n :alt: Supported Python versions\n\n.. image:: https://pypip.in/license/jsobject/badge.svg\n :target: https://pypi.python.org/pypi/jsobject/\n :alt: License\n\n.. image:: https://pypip.in/status/jsobject/badge.svg\n :target: https://pypi.python.org/pypi/jsobject/\n :alt: Development Status\n\njsobject: Objects for Humans\n============================\n\njsobject is simple implementation JavaScript-Style Objects in Python. It is distributed as a single file module and has no dependencies other than the `Python Standard Library <http://docs.python.org/library/>`_.\n\nHomepage and documentation: https://mavier.github.io/jsobject\n\n\nExample: \"Hello World\" with jsobject\n------------------------------------\n\n.. code-block:: python\n\n from jsobject import Object\n data = {\n \"boolean\": True,\n \"null\": None,\n \"number\": 123,\n \"objectA\": {'a': 'b', 'c': {'d': 'e', 'f': {'g': 'h'}}}\n }\n\n jso = Object(data)\n\n print(jso.boolean) # True\n print(jso.null) # None\n print(jso.number) # 123\n print(jso.objectA) # {'a': 'b', 'c': {'d': 'e', 'f': {'g': 'h'}}}\n print(jso.objectA.a) # b\n print(jso.objectA.c.d) # e\n print(jso.objectA.c.f.g) # h\n\nDownload and Install\n--------------------\n\nInstall the latest stable release with ``pip install jsobject``, ``easy_install -U jsobject`` or download `jsobject.py <https://github.com/mavier/jsobject/raw/master/jsobject.py>`__ (unstable) into your project directory. There are no hard dependencies other than the Python standard library. Jsobject runs with **Python 2.6+ and 3.x**.\n\nTesting\n_______\n\nTo run the tests use the `nosetest`.\n\n.. image:: https://travis-ci.org/mavier/jsobject.png?branch=master\n :target: https://travis-ci.org/mavier/jsobject\n\n.. image:: https://coveralls.io/repos/mavier/jsobject/badge.png\n :target: https://coveralls.io/r/mavier/jsobject\n\n\nLicense\n-------\n\nCode and documentation are available according to the `MIT License <https://raw.github.com/mavier/jsobject/master/LICENSE>`__.\n\nhttps://docs.python.org/3/library/json.html\nhttps://docs.python.org/2/library/functions.html\nhttps://docs.python.org/2/library/collections.html\nhttps://docs.python.org/2/library/json.html",
"bugtrack_url": null,
"license": "MIT",
"summary": "Jsobject is simple implementation JavaScript-Style Objects in Python.",
"version": "0.10.2",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "http://mavier.github.io/jsobject"
},
"split_keywords": [
"jsobject",
"object",
"json",
"chain",
"javascript"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "517ab1cf5c38d33535b8788f5b0d873dab0e3d38051ad8a26623d8653a29e56f",
"md5": "7d2cebdce1366d158951024e97c39d20",
"sha256": "405053613c8dee281af42424ace8a6f56de0b44f014b1e08dc4738aa3dba07e9"
},
"downloads": -1,
"filename": "jsobject-0.10.2.tar.gz",
"has_sig": false,
"md5_digest": "7d2cebdce1366d158951024e97c39d20",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4352,
"upload_time": "2015-05-06T23:34:12",
"upload_time_iso_8601": "2015-05-06T23:34:12.557350Z",
"url": "https://files.pythonhosted.org/packages/51/7a/b1cf5c38d33535b8788f5b0d873dab0e3d38051ad8a26623d8653a29e56f/jsobject-0.10.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2015-05-06 23:34:12",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "jsobject"
}