{ "info": { "author": "Miguel Alex Cantu", "author_email": "miguel.cantu@rackspace.com", "bugtrack_url": null, "classifiers": [], "description": "# parse_apache_configs\nA simple python library that will parse apache configs and convert them to a python data structure.\n\n====================\nparse_apache_configs\n====================\nA simple python library that will parse apache configs and convert them to a python data structure.\nThis will then allow the configs to be manipulated programatically.\n\n\n==============\nMain Functions\n==============\n\nTo use:\n\n.. code-block:: python\n \n from parse_apache_configs import parse_config\n\nParse the apache config via file path, and return a python object representation:\n\n.. code-block:: python\n\n apache_parse_obj = parse_config.ParseApacheConfig(apache_config_path=\"/some/path/to/file\")\n apache_config = apache_parse_obj.parse_config()\n\nor to parse the apache config as a string:\n\n.. code-block:: python\n\n apache_parse_obj = parse_config.ParseApacheConfig(apache_file_as_string=apache_string_obj)\n apache_config = apache_parse_obj.parse_config()\n\nNow you can use the apache_config object to manipulate the apache config.\n\nTo add or override an existing directive and return the result:\n\n.. code-block:: python\n\n apache_config = apache_parse_obj.add_directive(apache_config, \"SomeDirectiveName\", \"SomeDirectiveArguments\", \"\")\n\n\nThe code above will add the line \"SomeDirectiveName SomeDirectiveArguments\" under . If the directive\nis already there, then it's arguments will be overridden.\nKeep in mind that directives in nested tags can also be added/overridden, but their full \"path\" must be fed into\nadd_directive. For example, given the following apache file:\n\n.. code-block:: apache\n\n \n ServerName example.org\n ServerAlias *.example.org\n ErrorLog /var/log/httpd/example.err\n DocumentRoot /var/www/example.org\n \n Order allow,deny\n Allow from all\n \n \n\nTo override the \"Order\" directive under , the invocation to add_directive would look like this:\n\n.. code-block:: python\n\n apache_config = apache_parse_obj.add_directive(apache_config, \"Order\", \"deny,allow\", \"\", \"\")\n\n\nTo convert the apache_config object into a printable string:\n\n.. code-block:: python\n\n apache_config_string = apache_parse_obj.get_apache_config(apache_config)\n print apache_config_string\n\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/alextricity25/parse_apache_configs/tarball/0.0.2", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/alextricity25/parse_apache_configs", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "parse_apache_configs", "package_url": "https://pypi.org/project/parse_apache_configs/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/parse_apache_configs/", "project_urls": { "Download": "https://github.com/alextricity25/parse_apache_configs/tarball/0.0.2", "Homepage": "http://github.com/alextricity25/parse_apache_configs" }, "release_url": "https://pypi.org/project/parse_apache_configs/0.0.2/", "requires_dist": null, "requires_python": null, "summary": "A python module to parse apache config files.", "version": "0.0.2" }, "last_serial": 1934135, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "522c1de21a110e3e20b907ffc65371df", "sha256": "6608637688cb01515496995cc4c23e14dad4fad0800b5eba69df5606de6974b9" }, "downloads": -1, "filename": "parse_apache_configs-0.0.1.tar.gz", "has_sig": false, "md5_digest": "522c1de21a110e3e20b907ffc65371df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3903, "upload_time": "2016-01-21T23:29:57", "url": "https://files.pythonhosted.org/packages/26/89/5e53c0ccf76f001a3d8f60ad97082755cb5ca7ec3040a5854486d147a8a6/parse_apache_configs-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "87cb2c95657680a67f7462b18c667b27", "sha256": "000a98f518636bc9f8c06ba6ea2f7fb8fb0298c780b6a8e9a242ec393ecd29ac" }, "downloads": -1, "filename": "parse_apache_configs-0.0.2.tar.gz", "has_sig": false, "md5_digest": "87cb2c95657680a67f7462b18c667b27", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4658, "upload_time": "2016-02-01T17:19:15", "url": "https://files.pythonhosted.org/packages/3a/59/bfb842d06d90d3c1b55e097726061eb51da34dc4b23b6591c202094318cf/parse_apache_configs-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "87cb2c95657680a67f7462b18c667b27", "sha256": "000a98f518636bc9f8c06ba6ea2f7fb8fb0298c780b6a8e9a242ec393ecd29ac" }, "downloads": -1, "filename": "parse_apache_configs-0.0.2.tar.gz", "has_sig": false, "md5_digest": "87cb2c95657680a67f7462b18c667b27", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4658, "upload_time": "2016-02-01T17:19:15", "url": "https://files.pythonhosted.org/packages/3a/59/bfb842d06d90d3c1b55e097726061eb51da34dc4b23b6591c202094318cf/parse_apache_configs-0.0.2.tar.gz" } ] }