pyRinexpro.session

SessionStatus

class pyRinexpro.SessionStatus

Bases: enum.Enum

The session status

PRE_WAITING = 100
PRE_RUNNING = 101
PRE_ERROR = 102
PRE_SUCCESS = 103
NAV_RUNNING = 104
NAV_RETRY = 105
NAV_SUCCESS = 106
VRS_WAITING = 200
VRS_RUNNING = 201
VRS_ERROR = 202
VRS_SUCCESS = 203
SESS_DELETED = 999

ASession

class pyRinexpro.ASession(client, id)

Bases: object

An abstract class that containt the minimal Session data to request the api

Parameters:
  • client (Client) – The client to request the api
  • id (int) – The session id
delete()

Delete this session

getFile(file_type, save_to='')

Get a file associated to the session

Example:

>>> session.getFile('nav', 'new_nav_file')
Parameters:
  • file_type (str) – The file type, ‘orig’, ‘obs’ or ‘nav’, not case sensitive
  • save_to (str) – The path to save the file (default is ‘’)
Returns:

The content of the file if save_to is ‘’ or self

Return type:

list(byte) or ASession

export(path_or_buf=None)

Export the pdf report file

Parameters:path_or_buf (str or file) – The path or the file-like object to save the file (default is None)
Returns:The content of the file if save_to is ‘’ or self
Return type:list(byte) or None
setAccess(access)

Set the access of the session, this method update self

Example:

>>> session.setAccess('public')
Parameters:access (str) – The access type, ‘public’ or ‘private’, not case sensitive
Returns:self
Return type:ASession
newProcess(algo, *args, params=None, wait=False, refresh_rate=10, **kwarg)

Create a new process for the session

Example:

>>> process = session.newProcess('ppp', mode='kinematic')
Parameters:
  • algo (str) – The algorithm name ‘ppp’ or ‘diff’, case sensitive
  • *args – The same parameter as ParamsPPP.__init__() or ParamsDiff.__init__(), used when params is None
  • params (ParamsPPP or ParamsDiff) – The parameters of the algorithm (default is None)
  • wait (bool) – wait for the process to finish (default is None)
  • refresh_rate (int) – The time in second between each update, used when wait is True (default is 10)
  • **kwarg – The same parameters as ParamsPPP.__init__() or ParamsDiff.__init__(), used when params is None
Returns:

The created Process

Return type:

Process

virtualSession(name, wait=False, refresh_rate=10)

Create a virtual session

Example:

>>> vrs_session = session.virtualSession('MYVRS')
Parameters:name (str) – The session name
Returns:The created Session
Return type:Session

Session

class pyRinexpro.Session(json_obj, client)

Bases: pyRinexpro.session.ASession

A session

Parameters:
  • json_obj (object) – The parsed json
  • client (Client) – The client to request the api
update()

Update the object data

Returns:self
Return type:Session
to_dict()
wait(refresh_rate=10, wait_retry='ask')

Wait for the preprocessing of the session to finsh

Parameters:
  • refresh_rate (int) – The time in second between each update (default is 10)
  • wait_retry (str) – Should it wait for the preprocessing to retry (default is ask)
Returns:

self

Return type:

Session

SessionList

class pyRinexpro.SessionList(json_obj, client)

Bases: collections.UserList

A list of Session

Parameters:
  • json_obj (object) – The parsed json
  • client (Client) – The client to request the api
df()

Format the object to pandas DataFrame

Returns:The DataFrame
Return type:pandas.DataFrame
to_csv(path_or_buf=None, sep=', ')

Format and save the object to a csv file

Example:

>>> sessions.to_csv('sessions.csv')
Parameters:
  • path_or_buf (str or file) – The path or the file-like object to save the file (default is None)
  • sep (str) – the csv separator (default is ‘,’)
Returns:

Return the csv as a string is path_or_buf is None

Return type:

str or None

to_kml_obj(kml=None)

Format the object to a kml object

Parameters:kml (object) – The kml object, if None a kml object is created (default is None)
Returns:Return the kml object
Return type:object
to_kml(path_or_buf=None)

Format and save the object to a kml file

Example:

>>> sessions.to_kml('sessions.kml')
Parameters:path_or_buf (str or file) – The path or the file-like object to save the file (default is None)
Returns:Return the kml as a string if path_or_buf is None
Return type:str or None
to_kmz(path)

Format and save the object to a kmz file

Example:

>>> sessions.to_kmz('sessions.kmz')
Parameters:path_or_buf (str or file) – The path or the file-like object to save the file (default is None)
to_geojson_obj(geojson_obj=None)

Format the object to a geojson file

Parameters:geojson_obj (object) – The geojson object, if None a geojson object is created (default is None)
Returns:The geojson object
Return type:object
to_geojson(path_or_buf=None)

Format and save the object to a geojson file

Example:

>>> sessions.to_geojson('sessions.json')
Parameters:path_or_buf (str or file) – The path or the file-like object to save the file (default is None)
Returns:Return the geojson as a string if path_or_buf is None
Return type:str or None

ProcessOverview

class pyRinexpro.ProcessOverview(json_obj, client)

Bases: pyRinexpro.process.AProcess

The process overview

Parameters:
  • json_obj (object) – The parsed json
  • client (Client) – The client to request the api
get()

Get the actual process

Returns:The actual process
Return type:Process