{ "info": { "author": "Viacheslav Iutin", "author_email": "slava@smarttradeapp.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Utilities" ], "description": "==============\nDjango CBTools\n==============\n\nDjango CBTools is a wrapper around `Couchbase `_\npython library plus several hook to\n`Sync-Gateway `_ API.\n\nThe document search is done using ``Couchbase`` library (directly) connection\nto `couchbase server `_,\nbut saving and retrieving of the document is done using\n`Sync-Gateway HTTP API `_. This is done in order to have documents available for mobile\nclients, which can get all benefits of ``Couchbase`` library only through Sync-Gateway.\n\nThe essential part of the package is models. They are inherited from Django models\nwith almost all the benefits they have: can be validated with Django forms and have fields\nall sort of field you are used to have.\n\n\n============\nInstallation\n============\n\nPre-requisite\n-------------\n\n* working Couchbase server / cluster\n* working Sync-Gateway server\n\n\nRequirements\n------------\n\n* ``couchbase==2.0.2``\n* ``django-extensions==1.5.5``\n* ``django-tastypie==0.12.2``\n* ``requests==2.7.0``\n* ``shortuuid==0.4.2``\n\n``couchbase`` package installation can be tricky. A recipe for Ubuntu 12::\n\n sudo wget -O/etc/apt/sources.list.d/couchbase.list http://packages.couchbase.com/ubuntu/couchbase-ubuntu1204.list\n wget -O- http://packages.couchbase.com/ubuntu/couchbase.key | sudo apt-key add -\n sudo apt-get update\n sudo apt-get install libcouchbase-dev libcouchbase2-libevent\n \nFor Ubuntu 14::\n\n sudo wget -O/etc/apt/sources.list.d/couchbase.list http://packages.couchbase.com/ubuntu/couchbase-ubuntu1404.list\n wget -O- http://packages.couchbase.com/ubuntu/couchbase.key | sudo apt-key add -\n sudo apt-get update\n sudo apt-get install libcouchbase-dev libcouchbase2-libevent\n\nQuick Install\n-------------\n\nInstall package::\n\n pip install django-cbtools\n\nThe following configuration settings are used for the package (you can use the set below for the fast installation)::\n\n COUCHBASE_BUCKET = 'default'\n COUCHBASE_HOSTS = ['127.0.0.1']\n COUCHBASE_PASSWORD = None\n SYNC_GATEWAY_BUCKET = 'default'\n SYNC_GATEWAY_URL = 'http://127.0.0.1:4984'\n SYNC_GATEWAY_ADMIN_URL = 'http://127.0.0.1:4985'\n SYNC_GATEWAY_USER = \"demo_admin\"\n SYNC_GATEWAY_PASSWORD = \"demo_admin_password\"\n SYNC_GATEWAY_GUEST_USER = \"demo_guest\"\n SYNC_GATEWAY_GUEST_PASSWORD = \"demo_guest_password\"\n\nAdd ``django_cbtools`` to ``INSTALLED_APPS``::\n\n INSTALLED_APPS = (\n # ...\n 'django_cbtools',\n )\n\nCreate folder ``couchbase_views`` in the project root.\n\n\nTesting\n-------\n\nYou should create a testing couchbase bucket to run the package tests\n(and further your apps tests). For example ``default_test``.\n\nThe testing bucket must contain ``test`` in the name. Otherwise some\nhelper functions will raise exception.\n\nCertianly SyncGateway configuration must also have to be configurated properly\nto take in account additional bucket, for example::\n\n {\n \"adminInterface\":\"0.0.0.0:4985\",\n \"databases\": {\n \"default\": {\n \"server\": \"http://127.0.0.1:8091\",\n \"bucket\": \"default\"\n },\n \"default_test\": {\n \"server\": \"http://127.0.0.1:8091\",\n \"bucket\": \"default_test\"\n }\n }\n }\n\nAlso you need an alternative ``settings.py`` to run tests. Probably you already have\nsimilar file to run your own tests. If you don't it's time to create it now.\nThe following settings should be changed in order to run Couchbase-related tests properly:\n\n1. ``COUCHBASE_BUCKET`` is targetted to test bucket\n2. ``SYNC_GATEWAY_BUCKET`` is targetted to test bucket\n3. ``COUCHBASE_STALE`` is set to disable Couchbase caching\n\nLike that, in file ``settings_test.py``::\n\n # ...\n COUCHBASE_BUCKET = 'default_test'\n COUCHBASE_STALE = False\n SYNC_GATEWAY_BUCKET = 'default_test'\n # ...\n\nNow run tests as usual for django::\n\n python manage.py test --settings=.settings_test django_cbtools", "description_content_type": null, "docs_url": "https://pythonhosted.org/django-cbtools/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/smarttradeapp/django_cbtools", "keywords": "couchbase django sync-gateway", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-cbtools", "package_url": "https://pypi.org/project/django-cbtools/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-cbtools/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/smarttradeapp/django_cbtools" }, "release_url": "https://pypi.org/project/django-cbtools/1.2.0/", "requires_dist": null, "requires_python": null, "summary": "Simple models and views to work with Couchbase in Django applications.", "version": "1.2.0" }, "last_serial": 2083989, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "f620d38746fae0ac4ca0578cc10a3fb3", "sha256": "ec7357b8ad0129b2d0d0c882f30f8a8fbe9a984fbf33cccbae1f0d8b7431cba3" }, "downloads": -1, "filename": "django-cbtools-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f620d38746fae0ac4ca0578cc10a3fb3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24971, "upload_time": "2015-10-17T09:47:12", "url": "https://files.pythonhosted.org/packages/a5/44/3f32daeffdb9e414338977366a0508293c27bc9ad7fa1ef35ae6875762d6/django-cbtools-1.0.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "0891fd8f5fe4c008c9bd3c74c9d50794", "sha256": "72fe8752baf32f07a20a9f20b0a9f2acbda43cbbeb124491f82b2a6265611377" }, "downloads": -1, "filename": "django-cbtools-1.2.0.tar.gz", "has_sig": false, "md5_digest": "0891fd8f5fe4c008c9bd3c74c9d50794", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25950, "upload_time": "2016-04-26T03:47:00", "url": "https://files.pythonhosted.org/packages/aa/76/9da7c3b26cadbe8ea8ecc1bd6f21e1ac3159d9bd52af0a352a578d527ad2/django-cbtools-1.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0891fd8f5fe4c008c9bd3c74c9d50794", "sha256": "72fe8752baf32f07a20a9f20b0a9f2acbda43cbbeb124491f82b2a6265611377" }, "downloads": -1, "filename": "django-cbtools-1.2.0.tar.gz", "has_sig": false, "md5_digest": "0891fd8f5fe4c008c9bd3c74c9d50794", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25950, "upload_time": "2016-04-26T03:47:00", "url": "https://files.pythonhosted.org/packages/aa/76/9da7c3b26cadbe8ea8ecc1bd6f21e1ac3159d9bd52af0a352a578d527ad2/django-cbtools-1.2.0.tar.gz" } ] }