{ "info": { "author": "Bystroushaak", "author_email": "bystrousak@kitakitsune.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7" ], "description": "Introduction\n============\n\n.. image:: https://badge.fury.io/py/zeo_connector.png\n :target: https://pypi.python.org/pypi/zeo_connector\n\n.. image:: https://img.shields.io/pypi/dm/zeo_connector.svg\n :target: https://pypi.python.org/pypi/zeo_connector\n\n.. image:: https://img.shields.io/pypi/l/zeo_connector.svg\n\n.. image:: https://img.shields.io/github/issues/Bystroushaak/zeo_connector.svg\n :target: https://github.com/Bystroushaak/zeo_connector/issues\n\nWrappers, which make working with ZEO_ little bit nicer.\n\nBy default, you have to do a lot of stuff, like create connection to database, maintain it, synchronize it (or running asyncore loop), handle reconnects and so on. Classes defined in this project makes all this work for you at the background.\n\n.. _ZEO: http://www.zodb.org/en/latest/documentation/guide/zeo.html\n\nDocumentation\n-------------\n\nThis module defines three classes:\n\n - ZEOWrapperPrototype\n - ZEOConfWrapper\n - ZEOWrapper\n\nZEOWrapperPrototype\n+++++++++++++++++++\n``ZEOWrapperPrototype`` contains methods and shared attributes, which may be used by derived classes.\n\nYou can pretty much ignore this class, unless you want to make your own connector.\n\nZEOConfWrapper\n++++++++++++++\n``ZEOConfWrapper`` may be used to create connection to ZEO from `XML configuration file `_.\n\nLets say you have file ``/tests/data/zeo_client.conf``:\n\n.. code-block:: python\n\n \n server localhost:60985\n \n\nYou can now create the ``ZEOConfWrapper`` object:\n\n.. code-block:: python\n\n from zeo_connector import ZEOConfWrapper\n\n db_obj = ZEOConfWrapper(\n conf_path=\"/tests/data/zeo_client.conf\",\n project_key=\"Some project key\",\n )\n\nand save the data to the database:\n\n.. code-block:: python\n\n import transaction\n\n with transaction.manager:\n db_obj[\"data\"] = \"some data\"\n\nString ``\"some data\"`` is now saved under ``db._connection.root()[project_key][\"data\"]`` path.\n\nZEOWrapper\n++++++++++\n``ZEOWrapper`` doesn't use XML configuration file, but direct server/port specification:\n\n.. code-block:: python\n\n from zeo_connector import ZEOWrapper\n\n different_db_obj = ZEOWrapper(\n server=\"localhost\",\n port=60985,\n project_key=\"Some project key\",\n )\n\nSo you can retreive the data you stored into the database:\n\n.. code-block:: python\n\n import transaction\n\n with transaction.manager:\n print different_db_obj[\"data\"]\n\nRunning the ZEO server\n----------------------\nThe examples expects, that the ZEO server is running. To run the ZEO, look at the help page of the ``runzeo`` script which is part of the ZEO bundle. This script requires commandline or XML configuration.\n\nYou can generate the configuration files using provided ``zeo_connector_gen_defaults.py`` script, which is part of the `zeo_connector_defaults ` package::\n\n $ zeo_connector_gen_defaults.py --help\n usage: zeo_connector_gen_defaults.py [-h] [-s SERVER] [-p PORT] [-C] [-S]\n [PATH]\n\n This program will create the default ZEO XML configuration files.\n\n positional arguments:\n PATH Path to the database on the server (used in server\n configuration only.\n\n optional arguments:\n -h, --help show this help message and exit\n -s SERVER, --server SERVER\n Server url. Default: localhost\n -p PORT, --port PORT Port of the server. Default: 60985\n -C, --only-client Create only CLIENT configuration.\n -S, --only-server Create only SERVER configuration\n\nFor example::\n\n $ zeo_connector_gen_defaults.py /tmp\n\nwill create ``zeo.conf`` file with following content:\n\n.. code-block:: xml\n\n \n address localhost:60985\n \n\n \n path /tmp/storage.fs\n \n\n \n level INFO\n \n path /tmp/zeo.log\n format %(asctime)s %(message)s\n \n \n\nand ``zeo_client.conf`` containing:\n\n.. code-block:: xml\n\n \n server localhost:60985\n \n\nYou can change the ports and address of the server using ``--server`` or ``--port`` arguments.\n\nTo run the ZEO with the server configuration file, run the following command::\n\n runzeo -C zeo.conf\n\nTo run the client, you may use ``ZEOConfWrapper``, as was show above:\n\n.. code-block:: python\n\n from zeo_connector import ZEOConfWrapper\n\n db_obj = ZEOConfWrapper(\n conf_path=\"./zeo_client.conf\",\n project_key=\"Some project key\",\n )\n\nInstallation\n------------\n\nModule is `hosted at PYPI `_, and can be easily installed using `PIP`_::\n\n sudo pip install zeo_connector\n\n.. _PIP: http://en.wikipedia.org/wiki/Pip_%28package_manager%29\n\n\nSource code\n-----------\n\nProject is released under the MIT license. Source code can be found at GitHub:\n\n- https://github.com/Bystroushaak/zeo_connector\n\nUnittests\n---------\n\nYou can run the tests using provided ``run_tests.sh`` script, which can be found in the root of the project.\n\nIf you have any trouble, just add ``--pdb`` switch at the end of your ``run_tests.sh`` command like this: ``./run_tests.sh --pdb``. This will drop you to `PDB`_ shell.\n\n.. _PDB: https://docs.python.org/2/library/pdb.html\n\nRequirements\n++++++++++++\nThis script expects that package pytest_ is installed. In case you don't have it yet, it can be easily installed using following command::\n\n pip install --user pytest\n\nor for all users::\n\n sudo pip install pytest\n\n.. _pytest: http://pytest.org/\n\nExample\n+++++++\n\n::\n\n $ ./run_tests.sh \n ============================= test session starts ==============================\n platform linux2 -- Python 2.7.6 -- py-1.4.30 -- pytest-2.7.2\n rootdir: /home/bystrousak/Plocha/Dropbox/c0d3z/python/libs/zeo_connector, inifile: \n plugins: cov\n collected 7 items \n\n tests/test_zeo_connector.py .......\n\n =========================== 7 passed in 7.08 seconds ===========================\n\n\nChangelog\n=========\n\n0.4.8\n-----\n - ZEO version un-pinned. Will continue in https://github.com/zopefoundation/ZEO/issues/77\n\n0.4.7\n-----\n - Pinned older version of ZEO.\n\n0.4.6\n-----\n - Cleanup of metadata files.\n\n0.4.0 - 0.4.5\n-------------\n - Added ``@retry_and_reset`` decorator for all internal dict-methods calls.\n - Project key is now optional, so this object may be used to access the root of the database.\n - Property ``ASYNCORE_RUNNING`` renamed to ``_ASYNCORE_RUNNING``.\n - Implemented ``.pack()``.\n - Added ``@transaction_manager``.\n - Added ``examples/database_handler.py`` and tests.\n - Added @wraps(fn) to decorators.\n - Added requirement for zope.interface.\n - Attempt to solve https://github.com/WebArchivCZ/WA-KAT/issues/86\n\n0.3.0\n-----\n - Environment generator and other shared parts moved to https://github.com/Bystroushaak/zeo_connector_defaults\n - README.rst improved, added more documentation and additional sections.\n\n0.2.0\n-----\n - Added standard dict methods, like ``.__contains__()``, ``.__delitem__()``, ``.__iter__()`` and so on.\n\n0.1.0\n-----\n - Project created.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Bystroushaak/zeo_connector", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "zeo_connector", "package_url": "https://pypi.org/project/zeo_connector/", "platform": "", "project_url": "https://pypi.org/project/zeo_connector/", "project_urls": { "Homepage": "https://github.com/Bystroushaak/zeo_connector" }, "release_url": "https://pypi.org/project/zeo_connector/0.4.8/", "requires_dist": null, "requires_python": "", "summary": "Wrappers, which make working with ZEO little bit nicer.", "version": "0.4.8" }, "last_serial": 2404398, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "018c5d7958cdd1981c9944b4b1d7a3ca", "sha256": "206b88e06feec6285cc1575298a41b5ca4b8fab02fb8dfb48f8ef0315942f5a5" }, "downloads": -1, "filename": "zeo_connector-0.1.0.tar.gz", "has_sig": false, "md5_digest": "018c5d7958cdd1981c9944b4b1d7a3ca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7010, "upload_time": "2015-10-21T15:42:01", "url": "https://files.pythonhosted.org/packages/b7/88/e431d6e72af19e18475cceec457848571f0963f61b899bdb271aa3441ab0/zeo_connector-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "4a412180a20c54b5bcd4f6e9c2c82a52", "sha256": "6b1eede31be0a6b04b05531b6db47af4e4242ba135693b0b835e441d70a3965e" }, "downloads": -1, "filename": "zeo_connector-0.2.0.tar.gz", "has_sig": false, "md5_digest": "4a412180a20c54b5bcd4f6e9c2c82a52", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7344, "upload_time": "2015-10-22T12:05:05", "url": "https://files.pythonhosted.org/packages/fa/e5/0695e89fe93551171b21eb8b71e9681450e1c19f98abe440dda398941570/zeo_connector-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "738f6c9146c3548fbef1ec2de88c3c8b", "sha256": "3a9c52dde4f1e22be9915944e5c173d3aad56e8e2f05e72acdb2081670e2464a" }, "downloads": -1, "filename": "zeo_connector-0.3.0.tar.gz", "has_sig": false, "md5_digest": "738f6c9146c3548fbef1ec2de88c3c8b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7583, "upload_time": "2015-10-23T13:52:20", "url": "https://files.pythonhosted.org/packages/2b/c5/9489e9572a5a737b93addb0f134a8ce270ec34a1948f6505c64b4acca77f/zeo_connector-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "7a44aca4f1c5047d5c6da4e841a8de9b", "sha256": "c12aee15db2bfb70148d9efa52b660b053ab12ce58cab10e538975a4df701dae" }, "downloads": -1, "filename": "zeo_connector-0.4.0.tar.gz", "has_sig": false, "md5_digest": "7a44aca4f1c5047d5c6da4e841a8de9b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7984, "upload_time": "2015-10-27T15:45:00", "url": "https://files.pythonhosted.org/packages/84/bf/bb34f517c82e0cfab4a58467053682c877232a59c50e32820cc610c0e8be/zeo_connector-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "901bc3911a28ff73582ec7ad96a44cc2", "sha256": "e0f83628d8af3dba50f61897bad794fb6bdec4ef2f1ad37edc44a7ad051b0d3c" }, "downloads": -1, "filename": "zeo_connector-0.4.1.tar.gz", "has_sig": false, "md5_digest": "901bc3911a28ff73582ec7ad96a44cc2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8045, "upload_time": "2015-11-04T16:33:56", "url": "https://files.pythonhosted.org/packages/cd/0e/929c2718f882ac2c93281c7d7734bfd09e4370f28027211793ac89877678/zeo_connector-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "e6c0c05af9fae1ab08f48861dfdf284b", "sha256": "d31f07a8986fd36e57fcac13877f08cec83bd265a43946c42ec1613d7d58772f" }, "downloads": -1, "filename": "zeo_connector-0.4.2.tar.gz", "has_sig": false, "md5_digest": "e6c0c05af9fae1ab08f48861dfdf284b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8156, "upload_time": "2015-11-04T16:56:52", "url": "https://files.pythonhosted.org/packages/fa/9a/851451adcb69d6f63e04b0a6e7901c8f5c88daee34b1dd4ae36ca7c8022c/zeo_connector-0.4.2.tar.gz" } ], "0.4.3": [ { "comment_text": "", "digests": { "md5": "29961d2477b52148a78116b7c8acabee", "sha256": "f3ed360f532c1ba527681a8ce6a2c96ffef807398ae338afc07287bb8f3d46de" }, "downloads": -1, "filename": "zeo_connector-0.4.3.tar.gz", "has_sig": false, "md5_digest": "29961d2477b52148a78116b7c8acabee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9199, "upload_time": "2015-11-16T23:25:29", "url": "https://files.pythonhosted.org/packages/54/0e/a94bdf607903f4b66cd34b9d54278dd720e264c34299c807575eaaf71837/zeo_connector-0.4.3.tar.gz" } ], "0.4.4": [ { "comment_text": "", "digests": { "md5": "66a25c4ca1dd5be09f2dbc0b30f8c594", "sha256": "88797ecbbd57badaec81830f22a4738bbf56abac7f755855ca04d9ee8ad7ed04" }, "downloads": -1, "filename": "zeo_connector-0.4.4.tar.gz", "has_sig": false, "md5_digest": "66a25c4ca1dd5be09f2dbc0b30f8c594", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8599, "upload_time": "2015-12-09T14:57:31", "url": "https://files.pythonhosted.org/packages/c3/bc/fada7782b97560f2a8a9a7d07ff7119e99bf8737c29787f03ad335e2dc74/zeo_connector-0.4.4.tar.gz" } ], "0.4.5": [ { "comment_text": "", "digests": { "md5": "65724ba2d5847ca5d9cfaa85747494ac", "sha256": "dfc6e6a4aaf129a0ddaeb5418b6fd4ace3d4ceb3ddceb9e7630cafb844a45021" }, "downloads": -1, "filename": "zeo_connector-0.4.5.tar.gz", "has_sig": false, "md5_digest": "65724ba2d5847ca5d9cfaa85747494ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8669, "upload_time": "2016-10-17T14:12:28", "url": "https://files.pythonhosted.org/packages/7c/a7/9e797bedf9bf389ce5b783e79ab5d370a702a86fb80077ad524d18483870/zeo_connector-0.4.5.tar.gz" } ], "0.4.6": [ { "comment_text": "", "digests": { "md5": "2aa32854baa4c85f275e848c6de01b5a", "sha256": "5f9c62589b09769789b04343cb332c1ba8a68f3bdb723ecbd6967747ee9a7046" }, "downloads": -1, "filename": "zeo_connector-0.4.6.tar.gz", "has_sig": false, "md5_digest": "2aa32854baa4c85f275e848c6de01b5a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7957, "upload_time": "2016-10-17T14:44:07", "url": "https://files.pythonhosted.org/packages/e2/62/a224bece6151eefadde18659bca2fe6a19d2a4078bb171d597adafa6d5d6/zeo_connector-0.4.6.tar.gz" } ], "0.4.7": [ { "comment_text": "", "digests": { "md5": "6471251115e376f05226380d2ee9ddd0", "sha256": "d81abf7feaafecba72592f53d360ad2d941fa429711a17ef70e9811cdc9fd85c" }, "downloads": -1, "filename": "zeo_connector-0.4.7.tar.gz", "has_sig": false, "md5_digest": "6471251115e376f05226380d2ee9ddd0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7987, "upload_time": "2016-10-17T14:46:50", "url": "https://files.pythonhosted.org/packages/c9/89/383738e238a6bac1c01d8f620e303f6e683438b81cd24546a00d308eb5dc/zeo_connector-0.4.7.tar.gz" } ], "0.4.8": [ { "comment_text": "", "digests": { "md5": "3f98506a69b6e9d7571992e038f20bf0", "sha256": "d0d8f77ff595d2cae71daa49d7898b8cc9eab6d1028fcf70dfb3cd712e03f927" }, "downloads": -1, "filename": "zeo_connector-0.4.8.tar.gz", "has_sig": false, "md5_digest": "3f98506a69b6e9d7571992e038f20bf0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8036, "upload_time": "2016-10-17T15:56:50", "url": "https://files.pythonhosted.org/packages/7b/46/e7ac6a97d8ae7d6ee1115345c695a0efa6c42e187c35499cd19a3bd40ee4/zeo_connector-0.4.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3f98506a69b6e9d7571992e038f20bf0", "sha256": "d0d8f77ff595d2cae71daa49d7898b8cc9eab6d1028fcf70dfb3cd712e03f927" }, "downloads": -1, "filename": "zeo_connector-0.4.8.tar.gz", "has_sig": false, "md5_digest": "3f98506a69b6e9d7571992e038f20bf0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8036, "upload_time": "2016-10-17T15:56:50", "url": "https://files.pythonhosted.org/packages/7b/46/e7ac6a97d8ae7d6ee1115345c695a0efa6c42e187c35499cd19a3bd40ee4/zeo_connector-0.4.8.tar.gz" } ] }