| Pylocation. ±âÁú IP ÁÖ¼Ò¸¦À§ÇÑ ÆÄÀ̽㠷¡ÆÛ ¶óÀ̺귯¸® |
Áö±Ý ´Ù¿î·Îµå |
Pylocation. ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- MIT/X Consortium Lic...
- °Ô½ÃÀÚ À̸§:
- Mark Costello
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- https://github.com/mcos/
Pylocation. ű×
Pylocation. ¼³¸í
PylocationÀº PIP¸¦ »ç¿ëÇÏ¿© Pypi¸¦ »ç¿ëÇÏ¿© Pypi¸¦ »ç¿ëÇÏ¿© Pylocation Pylocation # IP ÁÖ¼Ò¸¦ ÁöÁ¤ÇÏÁö ¾Ê°í ÃʱâÈÇÏ´Â PIP ¼³Ä¡ PyLocation # Ãʱâȸ¦ »ç¿ëÇÏ¿© Pylocation Pyloc = pylocation ()À» »ç¿ëÇÏ¿© ÄÄÇ»ÅÍ¿¡¼ IP Á¤º¸ #À» Á¦°øÇÏÁö ¾Ê°íµµ IP ÁÖ¼Ò¸¦ »ç¿ëÇÏ¿© IP ÁÖ¼Ò Geolocation ¼ºñ½º¸¦ Æ÷ÀåÇÏ´Â Python ¸ðµâÀÔ´Ï´Ù. À§¿Í µ¿ÀÏÇÏÁö¸¸ GPS coordinatespyloc = pylocation (position = true) # ip addresspyloc = pylocation (ip = '8.8.8.8') # ÃʱâÈ´Â À§¿Í µ¿ÀÏÇÏÁö¸¸ GPS ÄÚµð³×ÀÌÆ® pyloc = pylocation (IP = ' 8.8.8.8 ', position = true) # outputspyloc.text #Àº À¯´Ï ÄÚµå·Î¼ Á¤º¸¸¦ ¹ÝȯÇÕ´Ï´Ù. stringpyloc.jsontext #Àº Á¤º¸¸¦ json stringpyloc.json # jsonÀ¸·Î ¹ÝȯÇÕ´Ï´Ù dictionarypyloc.xmltext #Àº Á¤º¸¸¦ ¹ÝȯÇÕ´Ï´Ù. xml stringpyloc.xml #Àº xml ¿ä¼Ò Æ®¸® "" "·Î¼ Á¤º¸¸¦ ¹ÝȯÇÕ´Ï´Ù. ´ÙÀ½Àº ÆÄÀ̽㠿ÀºêÁ§Æ®·Î¼ Á¤º¸¸¦ ¹ÝȯÇÕ´Ï´Ù." ""pylocinfo = pyloc.infoprint pylocinfo.ip # '8.8.8'Print pylocinfo.city # 'Mountain view, ca'print pylocinfo.country_name #'¹Ì±¹ 'Pylocinfo.Country_code #'US'Print pylocinfo.latitude # 37.402Print pylocinfo.longitude # -122.078 "" "¿©·¯ IP ÁÖ¼Ò¿¡ ´ëÇÑ Á¤º¸¸¦ ¾ò´Â °æ¿ì "" "" "" "" "pyloc = pylocation () pyloc.json #Àº È£½ºÆ®ÀÇ IP¿¡ ´ëÇÑ Geolocation Á¤º¸ÀÇ JSON Ç¥ÇöÀ» ¹ÝȯÇÕ´Ï´Ù. 8.8.8.8pyloc.position = True # GPS ÄÚµð³×ÀÌÆ®¸¦ Æ÷ÇÔ ½ÃÅ°½Ê½Ã¿À. PHYLOC.JSON #Àº IP 8.8.8.8ProductÀÇ È¨ÆäÀÌÁö¿¡ ´ëÇÑ Geolocation InfoÀÇ JSON Ç¥ÇöÀ» ¹ÝȯÇÕ´Ï´Ù.
Pylocation. °ü·Ã ¼ÒÇÁÆ®¿þ¾î