{ "info": { "author": "('sloev',)", "author_email": "johannes.valbjorn@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "Natural Language :: English", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "[![Latest Version](https://img.shields.io/pypi/v/cccp.svg)](https://pypi.python.org/pypi/cccp) [![Python Support](https://img.shields.io/pypi/pyversions/cccp.svg)](https://pypi.python.org/pypi/cccp)\n\n# CCCP - Semi Server Side Rendered \u262d\n\nCCCP uses [dominate](https://github.com/Knio/dominate) for generation of HTML in Python but **extends it with JavaScript snippets**\n\nIncludes:\n\n* Custom elements that can be rendered:\n * Function declarations for simple DOM manipulation\n * Indludes of external scripts (like jquery etc.)\n* Render function that can take a single or lists of *dominate HTML elements*\n\n## HTML tag manipulation using external sourcecode from GET's\n\nCCCP currently includes the following functions:\n\n(They all work by fetching html from a remote endpoint and manipulating a HTML tag with a given **id**)\n\n* **ReplaceHtml(url, id)**: Lets you replace the contents of an HTML tag\n* **AppendHtml(url, id)**: Lets you append to the end of a HTML tag\n* **PrependHtml(url, id)**: Lets you prepend to the beginning of a HTML tag\n\n## Usage\n\nInstall from **PYPI** (also installs [dominate](https://github.com/Knio/dominate)):\n\n```\n$ pip install cccp\n```\n\nImport modules:\n```\nfrom dominate import tags as t\nimport cccp\n```\n\nInclude needed definitions in HTML Head:\n\n```\nt.head(\n [\n cccp.REQUIRED,\n cccp.BOOTSTRAP,\n cccp.CreateReplaceHtmlFunc()\n ]\n )\n],\nt.body(\n [\n div(id=\"pageContent\")\n ]\n)\n```\n\nUse functions inside HTML to manipulate select DOM elements:\n\n```\nt.button(\n \"go to blog\",\n onClick=cccp.replaceHtml(\n \"http://127.0.0.1:9999/page/1\", \"pageContent\"\n ),\n)\n```\n\n\u261d\ufe0fThis will replace the contents of the div `\"pageContent\"` with the **HTML** it `GET`'s from `\"http://127.0.0.1:9999/page/1\"`\n\nsee [examples/flask_example.py](https://github.com/sloev/cccp/blob/master/examples/flask_example.py) for a full demo!\n\n## RoadMap\n\n- [x] Simple functions for replacing/appending/prepending of DOM elements\n- [x] Elements for popular js dependencies:\n - [x] **axios** used for HTTP requests (performs GET requests)\n - [x] **jquery** used for HTTP requests (does the DOM manipulation)\n- [ ] Error handling in bundled javascript functions\n- [ ] Simple **html forms** using **json-schema** for form validation etc\n- [ ] Implement tests\n- [ ] **chartjs**:\n - [ ] Element for including library\n - [ ] Functions for creating different kinds of interactive charts\n- [ ] More DOM manipulation javascript functions:\n - [ ] Function for creating a [Comet](https://en.wikipedia.org/wiki/Comet_(programming)) call and replacing/prepending/appending incomming html to the DOM\n - [ ] Functions for deleting DOM elements\n - [ ] Functions for pulling regularily (timer interupt GET's)\n\n\n### 0.0.1\n\n* implement simple javascript functions for DOM manipulations\n* create example using flask\n\n### 0.0.2\n\n* fix bugs\n* introduce more js snippets\n\n### 0.0.3\n\n* fix css snippet\n\n### 0.0.4\n\n* add xkcd line chart snippet\n\n### 0.0.10\n\n* drop xkcd chart and use chartjs\n\n### 0.0.11\n\n* line chart take options", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sloev/cccp", "keywords": "cccp serverside server side rendering", "license": "", "maintainer": "", "maintainer_email": "", "name": "cccp", "package_url": "https://pypi.org/project/cccp/", "platform": "", "project_url": "https://pypi.org/project/cccp/", "project_urls": { "Homepage": "https://github.com/sloev/cccp" }, "release_url": "https://pypi.org/project/cccp/0.0.11/", "requires_dist": null, "requires_python": "", "summary": "semi server side rendered html and javascript", "version": "0.0.11" }, "last_serial": 5961918, "releases": { "0.0.10": [ { "comment_text": "", "digests": { "md5": "023f526174eabb266f43424ba50a927e", "sha256": "2d8addf9e64abecd8ea134f50c7badbb8eedc82407a5633e2f51b7345c3e4425" }, "downloads": -1, "filename": "cccp-0.0.10.tar.gz", "has_sig": false, "md5_digest": "023f526174eabb266f43424ba50a927e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4604, "upload_time": "2019-10-11T20:14:12", "url": "https://files.pythonhosted.org/packages/6d/37/67df37185a412179d98af1e06a4cb5d5572339bea866befc7563dc873701/cccp-0.0.10.tar.gz" } ], "0.0.11": [ { "comment_text": "", "digests": { "md5": "bb162da6643100f261b18bd1aaa2bbb6", "sha256": "12cfbecaddaa4ebb3d12cd39877db202581b864e4e8fdc0d898267536839b242" }, "downloads": -1, "filename": "cccp-0.0.11.tar.gz", "has_sig": false, "md5_digest": "bb162da6643100f261b18bd1aaa2bbb6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4640, "upload_time": "2019-10-11T20:35:09", "url": "https://files.pythonhosted.org/packages/03/b2/e8f116f2ed5fca6408014187d71f73c2e7d9f524d3c0cfed4d94d3c9cb3e/cccp-0.0.11.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "f8efad9037ad0dc37ea2baf308d80fa2", "sha256": "e8384f9ec9f094612df36508fb7c96a877145940f474869a3dfa96b45769fd1f" }, "downloads": -1, "filename": "cccp-0.0.2.tar.gz", "has_sig": false, "md5_digest": "f8efad9037ad0dc37ea2baf308d80fa2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4322, "upload_time": "2019-10-03T06:59:35", "url": "https://files.pythonhosted.org/packages/66/f1/830abc62102ece4b1e973a43bdce410b8a5e4c8353460de43888b4cb4cec/cccp-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "c8637e417a155e97723de088bad5d017", "sha256": "324c95b2dc29e413bb842e627c084ab164d6c20ff8e41545c19d6c9ae14e7a21" }, "downloads": -1, "filename": "cccp-0.0.3.tar.gz", "has_sig": false, "md5_digest": "c8637e417a155e97723de088bad5d017", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4343, "upload_time": "2019-10-04T16:05:55", "url": "https://files.pythonhosted.org/packages/56/3e/5acc16a5b70174816670f838f14ce90bc78491e4b45253b8482dca5eec83/cccp-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "eae4e56890980e33189c198ad3bc6a26", "sha256": "301e6bb5e89bd5756ea6295bb23fa6b2ae0c4bd3c7bb3df6763cdb27679e4912" }, "downloads": -1, "filename": "cccp-0.0.4.tar.gz", "has_sig": false, "md5_digest": "eae4e56890980e33189c198ad3bc6a26", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4753, "upload_time": "2019-10-11T17:47:27", "url": "https://files.pythonhosted.org/packages/a0/10/16a47e69e8056d0dbcdf9ff927e4cb84ecfaf5c02fdc2071b46c7e4cd6c2/cccp-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "ee361d5751784f05f9e9409a52f0ce39", "sha256": "6275e95050e0f215bc90bd72bd9b6fe6a3efd631b2c764c17c06de284219ad5b" }, "downloads": -1, "filename": "cccp-0.0.5.tar.gz", "has_sig": false, "md5_digest": "ee361d5751784f05f9e9409a52f0ce39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4750, "upload_time": "2019-10-11T18:01:33", "url": "https://files.pythonhosted.org/packages/f8/96/11cc7ec0bdc708f9503184ce6dff543ded9dfb23c9dfce9e631ad0302db0/cccp-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "dbafacea8c87d97ede1cb9c3b0d4a010", "sha256": "8f6a0db33351d00e9bc02558b83882218edbc6b4a7f9bcc5e34704167eab1a94" }, "downloads": -1, "filename": "cccp-0.0.6.tar.gz", "has_sig": false, "md5_digest": "dbafacea8c87d97ede1cb9c3b0d4a010", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4753, "upload_time": "2019-10-11T18:54:39", "url": "https://files.pythonhosted.org/packages/55/a7/309529e4d44783e98101b5cc6f812a877059edf6311628071126484f5180/cccp-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "efff269dc9a162618f9c9d3a1cd17045", "sha256": "143e055d5c78d5992e46b4d9a8bd3840b47727aad96aca21ab2275a20a680d73" }, "downloads": -1, "filename": "cccp-0.0.7.tar.gz", "has_sig": false, "md5_digest": "efff269dc9a162618f9c9d3a1cd17045", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4754, "upload_time": "2019-10-11T18:56:57", "url": "https://files.pythonhosted.org/packages/b2/0d/d83d04f2426ad5f6bf7c9648fcad0401890f9af90bc780e0f3434cdceb6d/cccp-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "da39da4b633e0e1c2240c78ea87aa615", "sha256": "d8d9da40d6022db438fb2287f813e6b6baa96ed6b6e39f21f5e90e662162e87e" }, "downloads": -1, "filename": "cccp-0.0.8.tar.gz", "has_sig": false, "md5_digest": "da39da4b633e0e1c2240c78ea87aa615", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4762, "upload_time": "2019-10-11T19:25:36", "url": "https://files.pythonhosted.org/packages/51/be/f8f6cb9fb786a6716f22bca3debdbc99539eca6623b936c2c914bd44723d/cccp-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "47c40118f4127b9b87f676ec63c7ac37", "sha256": "0780d4bab816ba122f54ab203f81fd740660c09f491bd35f2848f05b2a21a562" }, "downloads": -1, "filename": "cccp-0.0.9.tar.gz", "has_sig": false, "md5_digest": "47c40118f4127b9b87f676ec63c7ac37", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4609, "upload_time": "2019-10-11T20:13:03", "url": "https://files.pythonhosted.org/packages/59/7b/0cc8be7d2dec005c553c386035748072835a27ddd44f2b39f6a280bdcd98/cccp-0.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bb162da6643100f261b18bd1aaa2bbb6", "sha256": "12cfbecaddaa4ebb3d12cd39877db202581b864e4e8fdc0d898267536839b242" }, "downloads": -1, "filename": "cccp-0.0.11.tar.gz", "has_sig": false, "md5_digest": "bb162da6643100f261b18bd1aaa2bbb6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4640, "upload_time": "2019-10-11T20:35:09", "url": "https://files.pythonhosted.org/packages/03/b2/e8f116f2ed5fca6408014187d71f73c2e7d9f524d3c0cfed4d94d3c9cb3e/cccp-0.0.11.tar.gz" } ] }