{ "info": { "author": "Dustin Oprea", "author_email": "myselfasunder@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "------------\nIntroduction\n------------\n\nThis is a client library for the `Geonames `_ RDF-compatible `web-services `_. At this time, only the `Search API `_ provides RDF responses and is, therefore, the only adapter available.\n\nRDF is often used in association with the `Semantic Web `_ and/or the `IoT `_.\n\n\n------------\nRequirements\n------------\n\n- requests\n- Python 2.x or 3.x\n\n\n------------\nInstallation\n------------\n\nVia PyPI::\n\n $ sudo pip install geonames_rdf\n\n\n-----\nUsage\n-----\n\nAs a library::\n\n import geonames.adapters.search\n\n _USERNAME = 'your_username'\n sa = geonames.adapters.search.Search(_USERNAME)\n\n result = sa.query('detroit').country('us').max_rows(5).execute()\n for id_, name in result.get_flat_results():\n # make_unicode() is only used here for Python version-compatibility.\n print(geonames.compat.make_unicode(\"[{0}]: [{1}]\").format(id_, name))\n\nWhen used as a library, a result object will be returned from the `execute()` method. The following are the ways to read the results (`get_flat_results` is used above):\n\n- The raw *lxml* object is exposed through the `xml` property.\n- The *get_xml_nodes* method will return a list of `Feature` `lxml.etree` objects from the resulting document, representing each of the results.\n- The *get_flat_results* method will simply yields a list of (id, name) 2-tuples if you're not interested in anything else. This is also what's returned, by default, from the command-line utility.\n\nAs a command-line utility::\n\n $ gn_search dsoprea -p query detroit -p country us -p max_rows 5\n [http://sws.geonames.org/4990729/]: [Detroit]\n [http://sws.geonames.org/6955112/]: [Detroit-Warren-Livonia]\n [http://sws.geonames.org/5024238/]: [Detroit Lakes Airport]\n [http://sws.geonames.org/4990733/]: [Detroit City Airport]\n [http://sws.geonames.org/4990742/]: [Detroit Metropolitan Wayne County Airport]\n\nYou may only provide string (non-boolean) parameters to the command-line utility.\n\n**NOTE:** You can also get the complete RDF response by passing the \"-x\" parameter.\n\nWhether you're using the library or the tool, the parameters that are available are:\n\n========================= =====================\nLibrary Parameter Name API Parameter Name\n========================= =====================\nquery q\nplace_name_like name\nplace_name_equals name_equals\nplace_name_starts_with name_startsWith\nmax_rows maxRows\nstart_row startRow\ncountry country\nshow_country_first countryBias\ncontinent continentCode\nadmin_code1 adminCode1\nadmin_code2 adminCode2\nadmin_code3 adminCode3\nfeature_class featureClass\nfeature_code featureCode\npopulation_class cities\nlanguage lang\nverbosity style\nforce_matching_name isNameRequired\ntag tag\noperator operator\ncharset charset\nfuzzy fuzzy\neast_west_north_south_box east,west,north,south\nplace_name_language searchlang\norder_by orderby\n========================= =====================\n\nSome of the parameters can be specified more than once. See the API documentation for more information.\n\n------------\nDesign Notes\n------------\n\n- Note that most of the parameters in the library are named differently from the API. Normally this goes against my policy, but I found so many of the parameters to be ambiguous or cryptic that I renamed those parameters to be clearer and just renamed the rest to underscore-separated naming while I was at it.\n\n- We mostly rely on the API to correctly validate against bad parameters. We don't like arbitrarily validating parameters in the client since the rules may change in the server and it's one more thing that might interfere with your implementation. However, if there is a type of validation that, for one reason or another, makes sense and/or would make things easier to develop against, let me know.", "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/dsoprea/PathManifest", "keywords": "geonames rdf", "license": "GPL 2", "maintainer": null, "maintainer_email": null, "name": "geonames_rdf", "package_url": "https://pypi.org/project/geonames_rdf/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/geonames_rdf/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/dsoprea/PathManifest" }, "release_url": "https://pypi.org/project/geonames_rdf/0.2.3/", "requires_dist": null, "requires_python": null, "summary": "Query data from geonames.org and return RDF/Semantic Web data.", "version": "0.2.3" }, "last_serial": 1655844, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "e64287d9dddcf156054d1f1e2e0d3ce3", "sha256": "95f69a0799e0e8a5da4178b783a3f5d392efba6cc3336ac0fe2d10e2eb7139f5" }, "downloads": -1, "filename": "geonames_rdf-0.2.0.tar.gz", "has_sig": false, "md5_digest": "e64287d9dddcf156054d1f1e2e0d3ce3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6073, "upload_time": "2015-07-29T08:58:31", "url": "https://files.pythonhosted.org/packages/3a/fb/1434136aa36f38570ff641a92bd142fd04b7cd21df190e476f7291e0db13/geonames_rdf-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "99b5a47e152a89a828e725df714dc018", "sha256": "83f1bacdf444dead0b1759ce3a335e7c3768d24a1c82ccae867ff7ffae01728b" }, "downloads": -1, "filename": "geonames_rdf-0.2.1.tar.gz", "has_sig": false, "md5_digest": "99b5a47e152a89a828e725df714dc018", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6208, "upload_time": "2015-07-29T21:48:09", "url": "https://files.pythonhosted.org/packages/35/d5/cc4c22422706544bd7e40e00d7e9e04e08c758527b76620185738c364eeb/geonames_rdf-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "ffff4478d3b4b979eb57fd0cadf146e2", "sha256": "a7e7e7b4ef26ef2ef1dc65c05fa97226b70638ae08768e1206451f8a9ed497ed" }, "downloads": -1, "filename": "geonames_rdf-0.2.2.tar.gz", "has_sig": false, "md5_digest": "ffff4478d3b4b979eb57fd0cadf146e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6147, "upload_time": "2015-07-29T22:21:44", "url": "https://files.pythonhosted.org/packages/69/db/2173617efd1295ac844e033f332df5a8bc7071e136180cfc9ea70f04709e/geonames_rdf-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "bd1b3e05b3161d2f90b1bc99153e2a87", "sha256": "2c46884929d505af101ca6d9b4968f19a57ecebfaec0d6fcc49ba9f82ba57c7a" }, "downloads": -1, "filename": "geonames_rdf-0.2.3.tar.gz", "has_sig": false, "md5_digest": "bd1b3e05b3161d2f90b1bc99153e2a87", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6257, "upload_time": "2015-07-29T23:23:42", "url": "https://files.pythonhosted.org/packages/96/5a/c21659cbb294dfc1d999a3074f943292baef7efb825330f345a56e6fc60f/geonames_rdf-0.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bd1b3e05b3161d2f90b1bc99153e2a87", "sha256": "2c46884929d505af101ca6d9b4968f19a57ecebfaec0d6fcc49ba9f82ba57c7a" }, "downloads": -1, "filename": "geonames_rdf-0.2.3.tar.gz", "has_sig": false, "md5_digest": "bd1b3e05b3161d2f90b1bc99153e2a87", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6257, "upload_time": "2015-07-29T23:23:42", "url": "https://files.pythonhosted.org/packages/96/5a/c21659cbb294dfc1d999a3074f943292baef7efb825330f345a56e6fc60f/geonames_rdf-0.2.3.tar.gz" } ] }