{ "info": { "author": "The Developer Society", "author_email": "studio@dev.ngo", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 3.5" ], "description": "================================\nChurch of England CMS API Client\n================================\n\n\n.. image:: https://img.shields.io/pypi/v/pycofecms.svg\n :target: https://pypi.python.org/pypi/pycofecms\n\n.. image:: https://readthedocs.org/projects/pycofecms/badge/?version=latest\n :target: https://pycofecms.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n\nBefore you start, make sure you have access credentials for the Church of England CMS API. You will\nneed a valid `API_ID` and `API_KEY`. See https://cmsapi.cofeportal.org/security for more\ninformation about this.\n\nMost of the endpoints also require a `diocese_id`. You should be supplied with this when you\nreceive your access credentials.\n\n\n* Free software: BSD license\n* Documentation: https://pycofecms.readthedocs.io\n\n\nFeatures\n========\n\n* Python client for the CofE CMS API (https://cmsapi.cofeportal.org/)\n* Python 3.5\n* 100% test coverage\n\n\nQuick Start\n===========\n\n.. code-block:: python\n\n >>> from cofecms import CofeCMS\n >>> cofe = CofeCMS(API_ID, API_KEY, diocese_id)\n >>> result = cofe.get_contacts(\n limit=10,\n fields={'contact': ['surname']},\n search_params={'keyword': 'smith', 'keyword_names_only': 'on'},\n )\n\n >>> # This query has 82 total results.\n >>> print(result.total_count)\n 82\n\n >>> # Spread across 9 pages\n >>> print(result.total_pages)\n 9\n\n >>> # Get the data for the first page for the query\n >>> print(result)\n [{'surname': 'Aynsley-Smith'},\n {'surname': 'Bradford-Smith'},\n {'surname': 'Brothertonsmith'},\n {'surname': 'Busen-Smith'},\n {'surname': 'Cox-Smith'},\n {'surname': 'Drummond Smith'},\n {'surname': 'Goldsmith'},\n {'surname': 'Grout-Smith'},\n {'surname': 'Hall-Smith'},\n {'surname': 'Harcourt-Smith'}]\n\n >>> # Get a specific page for the query\n >>> print(result.get_data_for_page(4))\n [{'surname': 'Smith-Agent'},\n {'surname': 'Smith-Cherry'},\n {'surname': 'Smith-McSmithSmith'},\n {'surname': 'Smith'},\n {'surname': 'Smith'},\n {'surname': 'Smith'},\n {'surname': 'Smith'},\n {'surname': 'Smith'},\n {'surname': 'Smith'},\n {'surname': 'Smith'}]\n\n >>> # Loop through all available pages\n >>> for page in result.pages_generator():\n print(len(page))\n 10\n 10\n 10\n 10\n 10\n 10\n 10\n 9\n 0\n\n\n >>> # Or retrieve all records for the query\n >>> print(result.all())\n [{'surname': 'Aynsley-Smith'},\n {'surname': 'Bradford-Smith'},\n {'surname': 'Brothertonsmith'},\n {'surname': 'Busen-Smith'},\n {'surname': 'Cox-Smith'},\n {'surname': 'Drummond Smith'},\n {'surname': 'Goldsmith'},\n ...\n {'surname': 'Smith'},\n {'surname': 'Smith'},\n {'surname': 'Smith'},\n {'surname': 'Smitherman'},\n {'surname': 'Smithers'},\n {'surname': 'Sutton-Smith'},\n {'surname': 'Thistleton-Smith'}]\n\n\n=======\nHistory\n=======\n\n0.1.0 (2017-03-20)\n------------------\n\n* First release on PyPI.\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/developersociety/pycofecms", "keywords": "cofecms", "license": "BSD license", "maintainer": "", "maintainer_email": "", "name": "pycofecms", "package_url": "https://pypi.org/project/pycofecms/", "platform": "", "project_url": "https://pypi.org/project/pycofecms/", "project_urls": { "Homepage": "https://github.com/developersociety/pycofecms" }, "release_url": "https://pypi.org/project/pycofecms/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "Church of England CMS API Client", "version": "0.1.1" }, "last_serial": 2979311, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "0642f6a39f5b39084ad5d0ed5f24bf92", "sha256": "4f1a18d355a569f6423d6db12468dc0a92c4f9b5afe0b85701d71813ad0bbd9e" }, "downloads": -1, "filename": "pycofecms-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0642f6a39f5b39084ad5d0ed5f24bf92", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 9391, "upload_time": "2017-05-30T13:55:40", "url": "https://files.pythonhosted.org/packages/0b/6b/b9d4fdf5ae5006425fb4ebb148321ff03739b370fc1271f4119e8c6b30f9/pycofecms-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "27b5bcf569cd2cccae65223c9a15da08", "sha256": "503142ffc82774118b6222d94a6000eb3d29958225d60dff49cabdefe3ca9f1d" }, "downloads": -1, "filename": "pycofecms-0.1.1.tar.gz", "has_sig": false, "md5_digest": "27b5bcf569cd2cccae65223c9a15da08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25663, "upload_time": "2017-05-30T13:55:38", "url": "https://files.pythonhosted.org/packages/ca/b4/34c87545411a7e05d0da836076e8fe999681c2e4779aa72de2e8854d2539/pycofecms-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0642f6a39f5b39084ad5d0ed5f24bf92", "sha256": "4f1a18d355a569f6423d6db12468dc0a92c4f9b5afe0b85701d71813ad0bbd9e" }, "downloads": -1, "filename": "pycofecms-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0642f6a39f5b39084ad5d0ed5f24bf92", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 9391, "upload_time": "2017-05-30T13:55:40", "url": "https://files.pythonhosted.org/packages/0b/6b/b9d4fdf5ae5006425fb4ebb148321ff03739b370fc1271f4119e8c6b30f9/pycofecms-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "27b5bcf569cd2cccae65223c9a15da08", "sha256": "503142ffc82774118b6222d94a6000eb3d29958225d60dff49cabdefe3ca9f1d" }, "downloads": -1, "filename": "pycofecms-0.1.1.tar.gz", "has_sig": false, "md5_digest": "27b5bcf569cd2cccae65223c9a15da08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25663, "upload_time": "2017-05-30T13:55:38", "url": "https://files.pythonhosted.org/packages/ca/b4/34c87545411a7e05d0da836076e8fe999681c2e4779aa72de2e8854d2539/pycofecms-0.1.1.tar.gz" } ] }