locationsharinglib package

Submodules

locationsharinglib.locationsharinglib module

Main code for locationsharinglib.

class locationsharinglib.locationsharinglib.Cookie(domain: str, flag: bool, path: str, secure: bool, expiry: int, name: str, value: str = '', rest: List[T] = <factory>)[source]

Bases: object

Models a cookie.

to_dict()[source]

Returns the cookie as a dictionary.

Returns:The dictionary with the required values of the cookie
Return type:cookie (dict)
value = ''
class locationsharinglib.locationsharinglib.Person(data)[source]

Bases: object

A person sharing its location as coordinates.

accuracy

The accuracy of the gps.

address

The address as reported by google for the current location.

battery_level

The battery level of the user’s device.

charging

Whether or not the user’s device is charging.

country_code

The location’s country code.

datetime

A datetime representation of the location retrieval.

full_name

The full name of the user as set in google.

id

The internal google id of the account.

latitude

The latitude of the person’s current location.

longitude

The longitude of the person’s current location.

nickname

The nickname as set in google.

picture_url

The url of the person’s avatar.

timestamp

The timestamp of the location retrieval.

class locationsharinglib.locationsharinglib.Service(cookies_file=None, authenticating_account='unknown@gmail.com')[source]

Bases: object

An object modeling the service to retrieve locations.

get_all_people()[source]

Retrieves all people sharing their location.

get_authenticated_person()[source]

Retrieves the person associated with this account.

get_coordinates_by_full_name(name)[source]

Retrieves a person’s coordinates by full name.

get_coordinates_by_nickname(nickname)[source]

Retrieves a person’s coordinates by nickname.

get_latitude_by_full_name(name)[source]

Retrieves a person’s latitude by name.

get_latitude_by_nickname(nickname)[source]

Retrieves a person’s latitude by nickname.

get_longitude_by_full_name(name)[source]

Retrieves a person’s longitude by name.

get_longitude_by_nickname(nickname)[source]

Retrieves a person’s longitude by nickname.

get_person_by_full_name(name)[source]

Retrieves a person by full name.

get_person_by_nickname(nickname)[source]

Retrieves a person by nickname.

get_shared_people()[source]

Retrieves all people that share their location with this account.

get_timedate_by_full_name(name)[source]

Retrieves a person’s time in unix format by name.

get_timedate_by_nickname(nickname)[source]

Retrieves a person’s time in unix format by nickname.

locationsharinglib.locationsharinglibexceptions module

Custom exception code for locationsharinglib.

exception locationsharinglib.locationsharinglibexceptions.InvalidCookieFile[source]

Bases: Exception

The cookies file provided could not be parsed for cookies.

exception locationsharinglib.locationsharinglibexceptions.InvalidCookies[source]

Bases: Exception

The cookies provided do not provide a valid session.

exception locationsharinglib.locationsharinglibexceptions.InvalidData[source]

Bases: Exception

The data received do not fit the expected format.

Module contents

locationsharinglib package.

Import all parts from locationsharinglib here