Client : Communicate with FLDIGI via XML-RPC

class pyfldigi.client.client.Client(hostname='127.0.0.1', port=7362, reset=True)[source]

Bases: object

A client that can read/write settings to FLDIGI via XML-RPC protocol

Official FLDIGI XML-RPC Protocol Documentation page

Note

Instances of the following classes will be instantiated and added as properties to the Client() object:

The purpose of pigeon-holing the functions into classes is to provide a convenient namespace, similar to the XML-RPC function names. I’ve taken a bit of artistic liberty with naming and grouping!

config_dir

Returns the name of the configuration directory

Returns:the configuration directory. NOTE: On a Windows machine, backslashes will be replaced with forward slashes
Return type:str
Example:
>>> import pyfldigi
>>> fldigi = pyfldigi.Client()
>>> fldigi.config_dir
'C:/Users/jeff/fldigi.files/'
delay(milliseconds)[source]

Simple delay / blocking call

Example:
>>> import pyfldigi
>>> fldigi = pyfldigi.Client()
>>> fldigi.delay(100)  # 100 millisecond delay
methods

Returns the list of methods in which fldigi can handle via the xml-rpc interface

Returns:Returns the list of methods in which fldigi can handle via the xml-rpc interface
Return type:list of dict
Example:
>>> import pyfldigi
>>> fldigi = pyfldigi.Client()
>>> fldigi.methods
[{'name': fldigi.list, 'signature': 'A:n', 'help': 'Returns the list of methods.'}, ... ]
name

Returns the program name and version

Returns:Returns the program name and version
Return type:str
Example:
>>> import pyfldigi
>>> fldigi = pyfldigi.Client()
>>> fldigi.name
fldigi
terminate(save_options=True, save_log=True, save_macros=True)[source]

Terminates fldigi. Sent as a bitmask specifying data to save: 0=options; 1=log; 2=macros

Parameters:
  • save_options (bool) – True to save options; False otherwise.
  • save_log (bool) – True to save log; False otherwise
  • save_macros (bool) – True to save macros; False otherwise
Example:
>>> import pyfldigi
>>> fldigi = pyfldigi.Client()
>>> fldigi.terminate()
version

Returns the program version as a python dict

Returns:Returns the program version
Return type:dict with the keys: ‘major’, ‘minor’, ‘patch’
Example:
>>> import pyfldigi
>>> fldigi = pyfldigi.Client()
>>> fldigi.version
{'major': 3, 'minor': 23, 'patch': '.17'}