Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gmaps-locationshare-api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gmaps-locationshare-api

Fully asynchronous (unofficial) API client for Google Map's location share functionality

  • 1.0.2
  • PyPI
  • Socket score

Maintainers
1

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)
  • 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

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc