{ "info": { "author": "Liam Cryan", "author_email": "cryan.liam@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 3" ], "description": "===========\nairporttime\n===========\n\nConvert local time to utc time by airport or vise-versa.\n\nThis works thanks to data from opentraveldata. The data source is here:\nhttps://raw.githubusercontent.com/opentraveldata/opentraveldata/master/opentraveldata/optd_por_public.csv\n\n\nUsage\n_____\n\nHere is the usage::\n\n >>> # import the library\n >>> import airporttime\n\n >>> # we are also going to use the datetime library\n >>> from datetime import datetime\n\n >>> # create an instance of AirportTime at 'ORD'\n >>> apt = airporttime.AirportTime(iata_code='ORD')\n\n >>> # ** side note ** the apt object contains one attribute, basically an instance of a row of data\n >>> print(apt.airport.__dict__)\n {'iata_code': 'ORD', 'icao_code': 'KORD', 'faa_code': 'ORD', 'is_geonames': 'Y', 'geoname_id': '4887479', 'envelope_id': '', 'name': \"Chicago O'Hare International Airport\", 'asciiname': \"Chicago O'Hare International Airport\", 'latitude': '41.978603', 'longitude': '-87.904842', 'fclass': 'S', 'fcode': 'AIRP', 'page_rank': '0.4871606262308594', 'date_from': '', 'date_until': '', 'comment': '', 'country_code': 'US', 'cc2': '', 'country_name': 'United States', 'continent_name': 'North America', 'adm1_code': 'IL', 'adm1_name_utf': 'Illinois', 'adm1_name_ascii': 'Illinois', 'adm2_code': '031', 'adm2_name_utf': 'Cook County', 'adm2_name_ascii': 'Cook County', 'adm3_code': '14000', 'adm4_code': '', 'population': '0', 'elevation': '201', 'gtopo30': '202', 'timezone': 'America/Chicago', 'gmt_offset': '-6.0', 'dst_offset': '-5.0', 'raw_offset': '-6.0', 'moddate': '2018-03-29', 'city_code_list': 'CHI', 'city_name_list': 'Chicago', 'city_detail_list': 'CHI|4887398|Chicago|Chicago', 'tvl_por_list': '', 'iso31662': 'IL', 'location_type': 'A', 'wiki_link': 'https://en.wikipedia.org/wiki/O%27Hare_International_Airport', 'alt_name_section': \"de|Flughafen Chicago O'Hare|=wuu|\u5965\u9ed1\u5c14\u56fd\u9645\u673a\u573a|=th|\u0e17\u0e48\u0e32\u0e2d\u0e32\u0e01\u0e32\u0e28\u0e22\u0e32\u0e19\u0e19\u0e32\u0e19\u0e32\u0e0a\u0e32\u0e15\u0e34\u0e42\u0e2d\u0e41\u0e2e\u0e23\u0e4c|=uk|\u0410\u0435\u0440\u043e\u043f\u043e\u0440\u0442 \u041e'\u0425\u0430\u0440\u0430|=ta|\u0b93\u0bb9\u0bc7\u0bb0\u0bcd \u0baa\u0ba9\u0bcd\u0ba9\u0bbe\u0b9f\u0bcd\u0b9f\u0bc1 \u0bb5\u0bbe\u0ba9\u0bc2\u0bb0\u0bcd\u0ba4\u0bbf \u0ba8\u0bbf\u0bb2\u0bc8\u0baf\u0bae\u0bcd|=ru|\u041c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u044b\u0439 \u0430\u044d\u0440\u043e\u043f\u043e\u0440\u0442 \u0427\u0438\u043a\u0430\u0433\u043e \u041e'\u0425\u0430\u0440\u0430|=ro|Aeroportul Interna\u021bional Chicago O'Hare|=pt|Aeroporto Internacional O'Hare|=pnb|\u0627\u0648\u06c1\u06cc\u0631 \u0627\u0646\u0679\u0631\u0646\u06cc\u0634\u0646\u0644 \u06c1\u0648\u0627\u0626\u06cc \u0627\u0688\u06c1|=ja|\u30b7\u30ab\u30b4\u30fb\u30aa\u30d8\u30a2\u56fd\u969b\u7a7a\u6e2f|=mr|\u0913'\u0939\u0947\u0930 \u0906\u0902\u0924\u0930\u0930\u093e\u0937\u094d\u091f\u094d\u0930\u0940\u092f \u0935\u093f\u092e\u093e\u0928\u0924\u0933|=ml|\u0d12'\u0d39\u0d46\u0d2f\u0d7c \u0d05\u0d28\u0d4d\u0d24\u0d3e\u0d30\u0d3e\u0d37\u0d4d\u0d1f\u0d4d\u0d30 \u0d35\u0d3f\u0d2e\u0d3e\u0d28\u0d24\u0d4d\u0d24\u0d3e\u0d35\u0d33\u0d02|=hu|O\u2019Hare nemzetk\u00f6zi rep\u00fcl\u0151t\u00e9r|=he|\u05e0\u05de\u05dc \u05d4\u05ea\u05e2\u05d5\u05e4\u05d4 \u05e9\u05d9\u05e7\u05d2\u05d5 \u05d0\u05d5'\u05d4\u05d9\u05d9\u05e8|=ko|\uc624\ud5e4\uc5b4 \uad6d\uc81c\uacf5\ud56d|=fr|A\u00e9roport international O'Hare de Chicago|=fa|\u0641\u0631\u0648\u062f\u06af\u0627\u0647 \u0628\u06cc\u0646\\u200c\u0627\u0644\u0645\u0644\u0644\u06cc \u0627\u0648\u0647\u0631 \u0634\u06cc\u06a9\u0627\u06af\u0648|=es|Aeropuerto Internacional O'Hare|=de|Chicago O\u2019Hare International Airport|=cs|Leti\u0161t\u011b Chicago O'Hare International Airport|=ar|\u0645\u0637\u0627\u0631 \u0623\u0648\u0647\u064a\u0631 \u0627\u0644\u062f\u0648\u0644\u064a|=en|Chicago O'Hare International Airport|p=|Orchard Field|=|O'Hare International Airport|=|Orchard Place/Douglas Field|=sv|Chicago O'Hare flygplats|p\", 'wac': '41', 'wac_name': 'Illinois', 'ccy_code': 'USD', 'unlc_list': 'USORD|', 'uic_list': ''}\n\n >>> # suppose you have a naive local datetime you want to convert\n >>> naive_loc_time = datetime(2019, 1, 1, 10, 30)\n\n >>> # convert your naive local date and time to utc\n >>> tz_aware_utc_time = apt.to_utc(naive_loc_time)\n >>> print(tz_aware_utc_time)\n 2019-02-02 16:30:00+00:00\n\n >>> # convert your tz aware back to local time if you want to\n >>> tz_aware_loc_time = apt.from_utc(tz_aware_utc_time)\n >>> print(tz_aware_loc_time)\n 2019-02-02 10:30:00-06:00\n\n >>> # ** side note ** this library internally tries to account daylight savings time (dst)\n >>> print(apt._dst(naive_loc_time, tz_aware_loc_time.tzinfo))\n False\n\n >>> # if you would like to update the data file, you can use:\n >>> airporttime.update()\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/liamcryan/airporttime", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "airporttime", "package_url": "https://pypi.org/project/airporttime/", "platform": "", "project_url": "https://pypi.org/project/airporttime/", "project_urls": { "Homepage": "https://github.com/liamcryan/airporttime" }, "release_url": "https://pypi.org/project/airporttime/0.0.0/", "requires_dist": [ "pytz", "requests" ], "requires_python": "", "summary": "convert local time to utc time by airport or vise-versa.", "version": "0.0.0" }, "last_serial": 4585710, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "0d2bd3a0535c30c95460c5ef00367ed4", "sha256": "023dcd53446c442ff8e301b6d628dbb5bd04b2df539b50f4a0836e3d989ad041" }, "downloads": -1, "filename": "airporttime-0.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "0d2bd3a0535c30c95460c5ef00367ed4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3192997, "upload_time": "2018-12-11T14:45:53", "url": "https://files.pythonhosted.org/packages/dd/d8/0fd921be5f9de4b5c321d2ec3f64069c1c90dde180b77c2c04034fb59e6f/airporttime-0.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c3f586e8a9da89c01c4f4c8f108e30de", "sha256": "651c57d89d2024618f2f04e61c49767dba881029b7959399d692c03cc3f8a8e5" }, "downloads": -1, "filename": "airporttime-0.0.0.tar.gz", "has_sig": false, "md5_digest": "c3f586e8a9da89c01c4f4c8f108e30de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3184787, "upload_time": "2018-12-11T14:46:25", "url": "https://files.pythonhosted.org/packages/7c/f8/4712fc521f282ad7718a21fb2dacfa47b5111b65e095ba04d93d9d480afc/airporttime-0.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0d2bd3a0535c30c95460c5ef00367ed4", "sha256": "023dcd53446c442ff8e301b6d628dbb5bd04b2df539b50f4a0836e3d989ad041" }, "downloads": -1, "filename": "airporttime-0.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "0d2bd3a0535c30c95460c5ef00367ed4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3192997, "upload_time": "2018-12-11T14:45:53", "url": "https://files.pythonhosted.org/packages/dd/d8/0fd921be5f9de4b5c321d2ec3f64069c1c90dde180b77c2c04034fb59e6f/airporttime-0.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c3f586e8a9da89c01c4f4c8f108e30de", "sha256": "651c57d89d2024618f2f04e61c49767dba881029b7959399d692c03cc3f8a8e5" }, "downloads": -1, "filename": "airporttime-0.0.0.tar.gz", "has_sig": false, "md5_digest": "c3f586e8a9da89c01c4f4c8f108e30de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3184787, "upload_time": "2018-12-11T14:46:25", "url": "https://files.pythonhosted.org/packages/7c/f8/4712fc521f282ad7718a21fb2dacfa47b5111b65e095ba04d93d9d480afc/airporttime-0.0.0.tar.gz" } ] }