gmaps-locationshare-api


Namegmaps-locationshare-api JSON
Version 1.0.2 PyPI version JSON
download
home_page
SummaryFully asynchronous (unofficial) API client for Google Map's location share functionality
upload_time2023-12-28 00:21:14
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords google maps async client location share location sharing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Google Maps location share API

A fully asynchronous API client for Google Map's location share functionality.

## Install

You must install the following libraries:
- `aiohttp` (asynchronous HTTP)
- `playwright` (asynchronous webdriver)
- `undetected-playwright-patch` ([Bypass Google's bot detection](https://github.com/kaliiiiiiiiii/undetected-playwright-python))
- `pickle` (session persistence)

It is recommended to install the following libraries:
- `asyncio` (Running asynchronous code)

Run `pip install gmaps-locationshare-api` to install.

## How it works

Playwright obtains a session via a manual log-in attempt by the user.
The client also has the ability to persist a session between different instances by
locally caching session cookies, and session refresh capabilities.

The client then uses said session to call Google's internal location share API to obtain relevant data.

## Documentation

Sample usages are in `main.py`

`class Client(persist: bool = False, persist_directory: str = None, timeout: int = 30000)`
- `persist`: Whether or not the session is locally cached to be used by subsequent invocation of `Client` in the same or a different program instance.
- `persist_directory`: Cache location. Note that the cache location must be consistent for all clients that wishes to use the cached session.
- `timeout`: Max allowed time to login before browser timeouts (in milliseconds)

`Client.refresh_session()`: Refresh session cookies to prevent stale sessions.

`Client.get_data() -> [Person]`: Get current location share data. Each call represent one reading at the current time, it doesn't not contain historical readings.

Relevant type definitions are in `gmaps_locationshare_api/types.py`

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "gmaps-locationshare-api",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "google,maps,async,client,location,share,location sharing",
    "author": "",
    "author_email": "Bowen Feng <857514.leofeng@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/cd/29/a0ac14eb03207996d0a1dba532005acd77b8440509936ea63d42dd8fb72b/gmaps_locationshare_api-1.0.2.tar.gz",
    "platform": null,
    "description": "# Google Maps location share API\r\n\r\nA fully asynchronous API client for Google Map's location share functionality.\r\n\r\n## Install\r\n\r\nYou must install the following libraries:\r\n- `aiohttp` (asynchronous HTTP)\r\n- `playwright` (asynchronous webdriver)\r\n- `undetected-playwright-patch` ([Bypass Google's bot detection](https://github.com/kaliiiiiiiiii/undetected-playwright-python))\r\n- `pickle` (session persistence)\r\n\r\nIt is recommended to install the following libraries:\r\n- `asyncio` (Running asynchronous code)\r\n\r\nRun `pip install gmaps-locationshare-api` to install.\r\n\r\n## How it works\r\n\r\nPlaywright obtains a session via a manual log-in attempt by the user.\r\nThe client also has the ability to persist a session between different instances by\r\nlocally caching session cookies, and session refresh capabilities.\r\n\r\nThe client then uses said session to call Google's internal location share API to obtain relevant data.\r\n\r\n## Documentation\r\n\r\nSample usages are in `main.py`\r\n\r\n`class Client(persist: bool = False, persist_directory: str = None, timeout: int = 30000)`\r\n- `persist`: Whether or not the session is locally cached to be used by subsequent invocation of `Client` in the same or a different program instance.\r\n- `persist_directory`: Cache location. Note that the cache location must be consistent for all clients that wishes to use the cached session.\r\n- `timeout`: Max allowed time to login before browser timeouts (in milliseconds)\r\n\r\n`Client.refresh_session()`: Refresh session cookies to prevent stale sessions.\r\n\r\n`Client.get_data() -> [Person]`: Get current location share data. Each call represent one reading at the current time, it doesn't not contain historical readings.\r\n\r\nRelevant type definitions are in `gmaps_locationshare_api/types.py`\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Fully asynchronous (unofficial) API client for Google Map's location share functionality",
    "version": "1.0.2",
    "project_urls": null,
    "split_keywords": [
        "google",
        "maps",
        "async",
        "client",
        "location",
        "share",
        "location sharing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4f5d8ee3af80abd4765aa67434c112c898dfc2c2dec8a8f294ac381ff78d3bf8",
                "md5": "d5c7160c953732a98b31ef67bbc2c374",
                "sha256": "769d834c0e391c8711c72de6a4ae9fa980460444b619173c4a7dc52112ae3718"
            },
            "downloads": -1,
            "filename": "gmaps_locationshare_api-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d5c7160c953732a98b31ef67bbc2c374",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 4941,
            "upload_time": "2023-12-28T00:21:11",
            "upload_time_iso_8601": "2023-12-28T00:21:11.471460Z",
            "url": "https://files.pythonhosted.org/packages/4f/5d/8ee3af80abd4765aa67434c112c898dfc2c2dec8a8f294ac381ff78d3bf8/gmaps_locationshare_api-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cd29a0ac14eb03207996d0a1dba532005acd77b8440509936ea63d42dd8fb72b",
                "md5": "f151d036bc0101667b5b0ee757aea61e",
                "sha256": "f164cb8b514547f842e6033390f9889b05a4ca1caca9c93c3428be9fe4dd4564"
            },
            "downloads": -1,
            "filename": "gmaps_locationshare_api-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "f151d036bc0101667b5b0ee757aea61e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 4178,
            "upload_time": "2023-12-28T00:21:14",
            "upload_time_iso_8601": "2023-12-28T00:21:14.012727Z",
            "url": "https://files.pythonhosted.org/packages/cd/29/a0ac14eb03207996d0a1dba532005acd77b8440509936ea63d42dd8fb72b/gmaps_locationshare_api-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-28 00:21:14",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "gmaps-locationshare-api"
}
        
Elapsed time: 0.16919s