pyxnat.Interface¶
-
class
pyxnat.
Interface
(server=None, user=None, password=None, cachedir='/tmp', config=None, anonymous=False, proxy=None, verify=None)¶ Main entry point to access a XNAT server.
>>> central = Interface(server='http://central.xnat.org:8080', user='login', password='pwd', cachedir='/tmp')
Or with config file:
>>> central = Interface(config='/home/me/.xnat.cfg')
Or for interactive use:
>>> central = Interface('http://central.xnat.org')
Note
The interactive mode is activated whenever an argument within server, user or password is missing. In interactive mode pyxnat tries to check the validity of the connection parameters.
Or anonymously (unauthenticated):
>>> central = Interface('http://central.xnat.org', anonymous=True)
-
_mode
¶ Online or offline mode
Type: online | offline
-
_memtimeout
¶ Lifespan of in-memory cache
Type: float
-
.. note::
Proxy support requires the socks module be installed. This can be installed via pip: pip install SocksiPy-branch
-
.. note::
All caching functionality has been removed from pyxnat as of 1.0.0.0. The cache was causing more hassle than it was worth.
-