{ "info": { "author": "Jonathan Tang", "author_email": "jonathan.d.tang@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX :: Linux", "Operating System :: Unix", "Programming Language :: C", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: Markup :: HTML" ], "description": "Gumbo - A pure-C HTML5 parser.\n==============================\n\nGumbo is an implementation of the `HTML5 parsing algorithm `_ implemented\nas a pure C99 library with no outside dependencies. It's designed to serve\nas a building block for other tools and libraries such as linters,\nvalidators, templating languages, and refactoring and analysis tools. This\npackage contains the library itself, Python ctypes bindings for the library, and\nadapters for html5lib and BeautifulSoup (3.2) that give it the same API as those\nlibaries.\n\nGoals & features:\n-----------------\n\n- Robust and resilient to bad input.\n\n- Simple API that can be easily wrapped by other languages.\n\n- Support for source locations and pointers back to the original text.\n\n- Relatively lightweight, with no outside dependencies.\n\n- Passes all `html5lib-0.95 tests `_.\n\n- Tested on over 2.5 billion pages from Google's index.\n\nNon-goals:\n----------\n\n- Execution speed. Gumbo gains some of this by virtue of being written in\n C, but it is not an important consideration for the intended use-case, and\n was not a major design factor.\n\n- Support for encodings other than UTF-8. For the most part, client code\n can convert the input stream to UTF-8 text using another library before\n processing.\n\n- Security. Gumbo was initially designed for a product that worked with\n trusted input files only. We're working to harden this and make sure that it\n behaves as expected even on malicious input, but for now, Gumbo should only be\n run on trusted input or within a sandbox.\n\n- C89 support. Most major compilers support C99 by now; the major exception\n (Microsoft Visual Studio) should be able to compile this in C++ mode with\n relatively few changes. (Bug reports welcome.)\n\nWishlist (aka \"We couldn't get these into the original release, but are\nhoping to add them soon\"):\n\n- Support for recent HTML5 spec changes to support the template tag.\n\n- Support for fragment parsing.\n\n- Full-featured error reporting.\n\n- Bindings in other languages.\n\nInstallation\n------------\n\n```pip install gumbo``` should do it. If you have a local copy, ```python\nsetup.py install``` from the root directory.\n\nThe `html5lib `_ and\n`BeautifulSoup `_ adapters\nrequire that their respective libraries be installed separately to work.\n\nBasic Usage\n-----------\n\nFor the ctypes bindings:\n\n.. code-block:: python\n\n import gumbo\n \n with gumbo.parse(text) as output:\n root = output.contents.root.contents\n # root is a Node object representing the root of the parse tree\n # tree-walk over it as necessary.\n\nFor the BeautifulSoup bindings:\n\n.. code-block:: python\n\n import gumbo\n\n soup = gumbo.soup_parse(text)\n # soup is a BeautifulSoup object representing the parse tree.\n\nFor the html5lib bindings:\n\n.. code-block:: python\n\n from gumbo import html5lib\n\n doc = html5lib.parse(text[, treebuilder='lxml'])\n\nRecommended best-practice for Python usage is to use one of the adapters to\nan existing API (personally, I prefer BeautifulSoup) and write your program\nin terms of those. The raw CTypes bindings should be considered building\nblocks for higher-level libraries and rarely referenced directly.\n\nSee the source code, Pydoc, and implementation of soup_adapter and\nhtml5lib_adapter for more information.\n\nA note on API/ABI compatibility\n-------------------------------\n\nWe'll make a best effort to preserve API compatibility between releases.\nThe initial release is a 0.9 (beta) release to solicit comments from early\nadopters, but if no major problems are found with the API, a 1.0 release\nwill follow shortly, and the API of that should be considered stable. If\nchanges are necessary, we follow [semantic versioning][].\n\nWe make no such guarantees about the ABI, and it's very likely that\nsubsequent versions may require a recompile of client code. For this\nreason, we recommend NOT using Gumbo data structures throughout a program,\nand instead limiting them to a translation layer that picks out whatever\ndata is needed from the parse tree and then converts that to persistent\ndata structures more appropriate for the application. The API is\nstructured to encourage this use, with a single delete function for the\nwhole parse tree, and is not designed with mutation in mind.\n\nMost of this is transparent to Python usage, as the Python adapters are all\nbuilt with this in mind. However, since ctypes requires ABI compatibility, it\ndoes mean you'll have to re-deploy the gumboc library and C extension when\nupgrading to a new version.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/google/gumbo-parser", "keywords": "gumbo html html5 parser google html5lib beautifulsoup", "license": "Apache 2.0", "maintainer": null, "maintainer_email": null, "name": "gumbo", "package_url": "https://pypi.org/project/gumbo/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/gumbo/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/google/gumbo-parser" }, "release_url": "https://pypi.org/project/gumbo/0.10.0/", "requires_dist": null, "requires_python": null, "summary": "Python bindings for Gumbo HTML parser", "version": "0.10.0" }, "last_serial": 1528847, "releases": { "0.10.0": [ { "comment_text": "built for Darwin-14.1.1", "digests": { "md5": "159cc0085ea06ac881490d464db4d6fa", "sha256": "48e9dac2a872a9e2677b63c0bb7a39a76051c703abf30fff4df60664dfda52f4" }, "downloads": -1, "filename": "gumbo-0.10.0.macosx-10.10-x86_64.tar.gz", "has_sig": false, "md5_digest": "159cc0085ea06ac881490d464db4d6fa", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 170318, "upload_time": "2015-05-01T02:52:53", "url": "https://files.pythonhosted.org/packages/69/61/6f3352d8f99853485c1af6647dfa13112cf05df0498699826b4056fa5656/gumbo-0.10.0.macosx-10.10-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "08cd1c348d65241fc4f0f303d76fbfea", "sha256": "e8c5504479a535ae7683c6bfba787ea37aa2fe77ae3e40943595a8adebb4d508" }, "downloads": -1, "filename": "gumbo-0.10.0.tar.gz", "has_sig": false, "md5_digest": "08cd1c348d65241fc4f0f303d76fbfea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 160033, "upload_time": "2015-05-01T02:52:50", "url": "https://files.pythonhosted.org/packages/4b/b2/9ab68b19cd9dab5c94d0db7ec5860ef112257bb27b2c108b9c449e5797ec/gumbo-0.10.0.tar.gz" } ], "0.9.1": [ { "comment_text": "built for Linux-3.13.0-32-generic-x86_64-with-glibc2.4", "digests": { "md5": "92a419adba052d0e7418e9f6971ea44b", "sha256": "c3562f8f5ad2564e3d327be1bb8f4bde6909227307704f57f9d2bf472570581e" }, "downloads": -1, "filename": "gumbo-0.9.1.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "92a419adba052d0e7418e9f6971ea44b", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 232927, "upload_time": "2014-08-07T01:57:04", "url": "https://files.pythonhosted.org/packages/64/c5/61623963231c35aaa7130d2bc8d6c77785bc719f7fa419a6472adbabeb06/gumbo-0.9.1.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "a114bc2a177e413b19bf8c4ebb3801be", "sha256": "ec3bd58b85e47253a90606e18c61fe26571e9b2304435525b2ac9b1b9e998c72" }, "downloads": -1, "filename": "gumbo-0.9.1.tar.gz", "has_sig": false, "md5_digest": "a114bc2a177e413b19bf8c4ebb3801be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 622703, "upload_time": "2014-08-07T01:57:01", "url": "https://files.pythonhosted.org/packages/59/fb/a88da53699408fd266c149f3a0334a16b8759edc5c333e70e793ba7f7db9/gumbo-0.9.1.tar.gz" } ], "0.9.2": [ { "comment_text": "built for Linux-3.13.0-35-generic-x86_64-with-glibc2.4", "digests": { "md5": "5179ca5dea58f2d0ab2bfa521483794d", "sha256": "b9b2ef8462ec1a2aabc3cc5ee4fa01e0233be38e9d1ebc8b35cb88b735937220" }, "downloads": -1, "filename": "gumbo-0.9.2.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "5179ca5dea58f2d0ab2bfa521483794d", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 232963, "upload_time": "2014-09-22T17:09:47", "url": "https://files.pythonhosted.org/packages/71/7b/28b95f27276483f8be9e7703fae301bdc82516d5db27a2b8838e23a39f15/gumbo-0.9.2.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "8f5c699bc9b8d47db5aac5dc12e58003", "sha256": "b65352428d7ec61f28f9583ee35f174d032391a767f2cc10d84e0395b310be22" }, "downloads": -1, "filename": "gumbo-0.9.2.tar.gz", "has_sig": false, "md5_digest": "8f5c699bc9b8d47db5aac5dc12e58003", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 727601, "upload_time": "2014-09-22T17:09:42", "url": "https://files.pythonhosted.org/packages/4d/b2/2d7176ff6686c727ce2460d6ef9064f6e6cbfa881a6d4eee6d5d352f8f6f/gumbo-0.9.2.tar.gz" } ], "0.9.3": [ { "comment_text": "", "digests": { "md5": "3110aba9dec2c9b5cdb27235b21b4b9f", "sha256": "9c1f463224c6f942a06fff504e5e1246e71c14d9e80b37f5f38c534d16360cb8" }, "downloads": -1, "filename": "gumbo-0.9.3.tar.gz", "has_sig": false, "md5_digest": "3110aba9dec2c9b5cdb27235b21b4b9f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 804744, "upload_time": "2015-02-21T20:57:37", "url": "https://files.pythonhosted.org/packages/b4/4c/e95811836ec58cd1a0ed6597204e2a4a9c635f936639b8a183f31dc8999f/gumbo-0.9.3.tar.gz" } ], "0.9.4": [ { "comment_text": "built for Darwin-14.1.1", "digests": { "md5": "b16726fe4abcdf2e68ce92e2c0967422", "sha256": "b7498a62abf62aecfedf05577ed1b88e8f2f07a8d4201d67f997bf60c2aa2ecf" }, "downloads": -1, "filename": "gumbo-0.9.4.macosx-10.10-x86_64.tar.gz", "has_sig": false, "md5_digest": "b16726fe4abcdf2e68ce92e2c0967422", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 164698, "upload_time": "2015-05-01T02:47:23", "url": "https://files.pythonhosted.org/packages/0a/61/9a29a3484d724a0fb8889a1ab31566250d92add80fe67af1be48bfd3f4a5/gumbo-0.9.4.macosx-10.10-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "7fb594de1e1ff9a528791921fd53ce3e", "sha256": "89a064736817f4702af391ee7941dde8fc547b0cc8031adca6ec6fb6521f678e" }, "downloads": -1, "filename": "gumbo-0.9.4.tar.gz", "has_sig": false, "md5_digest": "7fb594de1e1ff9a528791921fd53ce3e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 155798, "upload_time": "2015-05-01T02:47:20", "url": "https://files.pythonhosted.org/packages/ef/38/4ea86b69464c29f06b0b2241143d3386b309a2bdd69ba468dc1c03902c75/gumbo-0.9.4.tar.gz" } ] }, "urls": [ { "comment_text": "built for Darwin-14.1.1", "digests": { "md5": "159cc0085ea06ac881490d464db4d6fa", "sha256": "48e9dac2a872a9e2677b63c0bb7a39a76051c703abf30fff4df60664dfda52f4" }, "downloads": -1, "filename": "gumbo-0.10.0.macosx-10.10-x86_64.tar.gz", "has_sig": false, "md5_digest": "159cc0085ea06ac881490d464db4d6fa", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 170318, "upload_time": "2015-05-01T02:52:53", "url": "https://files.pythonhosted.org/packages/69/61/6f3352d8f99853485c1af6647dfa13112cf05df0498699826b4056fa5656/gumbo-0.10.0.macosx-10.10-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "08cd1c348d65241fc4f0f303d76fbfea", "sha256": "e8c5504479a535ae7683c6bfba787ea37aa2fe77ae3e40943595a8adebb4d508" }, "downloads": -1, "filename": "gumbo-0.10.0.tar.gz", "has_sig": false, "md5_digest": "08cd1c348d65241fc4f0f303d76fbfea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 160033, "upload_time": "2015-05-01T02:52:50", "url": "https://files.pythonhosted.org/packages/4b/b2/9ab68b19cd9dab5c94d0db7ec5860ef112257bb27b2c108b9c449e5797ec/gumbo-0.10.0.tar.gz" } ] }