{ "info": { "author": "Outernet Inc", "author_email": "apps@outernet.is", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Topic :: System :: Hardware", "Topic :: Utilities" ], "description": "=============\npyhostapdconf\n=============\n\nThis package contains a library for working with hostapd configuration file in\nPython. It is intended for configuring simple access points and supports the\nfolowing configuration:\n\n- Interface selection\n- Driver selection (nl80211 and rtl871xdrv, as supported)\n- SSID\n- Country code\n- Channel\n- WPA configuration (passphrase, WPA mode)\n- Maximum client limit\n- Hidden SSID\n\nConfiguration class\n===================\n\nTo load the configuration file, use the ``HostapdConf`` class::\n\n >>> from hostapdconf.parser import HostapdConf\n >>> conf = HostapdConf('example/hostapd_example.conf')\n\nThis class is a generic configuration parser/writer and doesn't know much about\nhow configuration options work. It behaves like a dictionary, and you can look\nup keys using subscript notation. For example::\n\n\n >>> conf['interface']\n 'wlan0'\n\nIf a key is not found, a ``KeyError`` is raised. ::\n\n >>> conf['driver']\n KeyError: '' has no key 'driver'\n\nYou can set any key by assigning::\n\n >>> conf['driver'] = 'nl80211'\n\nYou can update multiple values by calling the ``update()`` method with a\ndictionary as its argument, just like with Python dictionaries. Finally, if you\nwant to save the configuration file, you can use the ``write()`` method::\n\n >>> conf.write()\n\n.. warning::\n Calling ``write()`` overwrites the file that was loaded and comments are\n **not** preserved.\n\nIf you wish to save the file to another location, simply pass the path to the\n``write()`` method. To reload the configuration, you can use the ``reload()``\nmethod.\n\n``HostapdConf`` class will preserve the order of the configuration keys as much\nas possible, but it does not offer methods for inserting configuration options\nat random locations.\n\nHelper functions\n================\n\nTo help with common configuration tasks, there is a number of helper methods.\n\nHelpers are found in the ``hosapdconf.helpers`` module. ::\n\n >>> from hostapdconf import helpers as ha\n\nEach helper function takes the configuration object as first argument followed\nby arguments specific to the setting. Here is a quick overview of the helper\nmethods::\n\n >>> ha.set_ssid(conf, 'Foobar')\n >>> ha.hide_ssid(conf)\n >>> ha.reveal_ssid(conf)\n >>> ha.set_iface(conf, 'wlan2')\n >>> ha.set_driver(conf, ha.REALTEK) # or ha.STANDARD\n >>> ha.set_channel(conf, 2)\n # wpa_modes supported: ha.WPA1_ONLY, ha.WPA2_ONLY, ha.WPA_BOTH\n >>> ha.enable_wpa(conf, passphrase='SECRET', wpa_mode=ha.WPA2_ONLY)\n >>> ha.disable_wpa(conf)\n >>> ha.set_country(conf, 'de')\n\nLicense\n=======\n\npyhostapdconf is released under GPLv3. Please see the ``COPYING`` file in the\nsource tree.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Outernet-Project/confloader", "keywords": null, "license": "GPLv3", "maintainer": null, "maintainer_email": null, "name": "pyhostapdconf", "package_url": "https://pypi.org/project/pyhostapdconf/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyhostapdconf/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Outernet-Project/confloader" }, "release_url": "https://pypi.org/project/pyhostapdconf/1.0/", "requires_dist": null, "requires_python": null, "summary": "Library for working with hostapd configuation files", "version": "1.0" }, "last_serial": 2045335, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "c012c2e7696f2cb6899bad11d7a99588", "sha256": "a889d06e7d141f325b6c8be328cf2a30d40559ae24a88e0d571229e217488a83" }, "downloads": -1, "filename": "pyhostapdconf-1.0.tar.gz", "has_sig": false, "md5_digest": "c012c2e7696f2cb6899bad11d7a99588", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18020, "upload_time": "2016-04-04T19:03:10", "url": "https://files.pythonhosted.org/packages/59/5c/b1c9069f1f6a72dcfb7b6e10c46a9eaa74e99e9a2b287a7f687e36e2db4f/pyhostapdconf-1.0.tar.gz" }, { "comment_text": "", "digests": { "md5": "4d59e1244c962b306dd3abc0ef40f8e2", "sha256": "3e3c8f85b58f8d889285a7249fb28d57b840efdf8f45b9ac81b1b43840f59f33" }, "downloads": -1, "filename": "pyhostapdconf-1.0.zip", "has_sig": false, "md5_digest": "4d59e1244c962b306dd3abc0ef40f8e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21497, "upload_time": "2016-04-04T19:03:29", "url": "https://files.pythonhosted.org/packages/19/3f/fbcb1ee42944ca36d4597c11dad52e15730e9e33b88b28fa6921c56d8535/pyhostapdconf-1.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c012c2e7696f2cb6899bad11d7a99588", "sha256": "a889d06e7d141f325b6c8be328cf2a30d40559ae24a88e0d571229e217488a83" }, "downloads": -1, "filename": "pyhostapdconf-1.0.tar.gz", "has_sig": false, "md5_digest": "c012c2e7696f2cb6899bad11d7a99588", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18020, "upload_time": "2016-04-04T19:03:10", "url": "https://files.pythonhosted.org/packages/59/5c/b1c9069f1f6a72dcfb7b6e10c46a9eaa74e99e9a2b287a7f687e36e2db4f/pyhostapdconf-1.0.tar.gz" }, { "comment_text": "", "digests": { "md5": "4d59e1244c962b306dd3abc0ef40f8e2", "sha256": "3e3c8f85b58f8d889285a7249fb28d57b840efdf8f45b9ac81b1b43840f59f33" }, "downloads": -1, "filename": "pyhostapdconf-1.0.zip", "has_sig": false, "md5_digest": "4d59e1244c962b306dd3abc0ef40f8e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21497, "upload_time": "2016-04-04T19:03:29", "url": "https://files.pythonhosted.org/packages/19/3f/fbcb1ee42944ca36d4597c11dad52e15730e9e33b88b28fa6921c56d8535/pyhostapdconf-1.0.zip" } ] }