Package intermine :: Package lists :: Module listmanager :: Class ListManager
[hide private]
[frames] | no frames]

Class ListManager

source code

object --+
         |
        ListManager

A Class for Managing List Content and Operations

This class serves as a delegate for the intermine.webservice.Service class, managing list content and operations.

This class is not meant to be called itself, but rather for its methods to be called by the service object.

Instance Methods [hide private]
 
__init__(self, service)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
refresh_lists(self)
Update the list information with the latest details from the server
source code
 
get_list(self, name)
Return a list from the service by name, if it exists
source code
 
l(self, name)
Alias for get_list
source code
 
get_all_lists(self)
Get all the lists on a webservice
source code
 
get_all_list_names(self)
Get all the names of the lists in a particular webservice
source code
 
get_list_count(self)
Return the number of lists accessible at the given webservice.
source code
 
get_unused_list_name(self)
Get a list name that does not conflict with any lists you have access to
source code
intermine.lists.List
create_list(self, content, list_type='', name=None, description=None, tags=[])
If no name is given, the list will be considered to be a temporary list, and will be automatically deleted when the program ends.
source code
 
parse_list_upload_response(self, response)
Intepret the response from the webserver to a list request, and return the List it describes
source code
 
delete_lists(self, lists)
Delete the given lists from the webserver
source code
 
delete_temporary_lists(self)
Delete all the lists considered temporary (those created without names)
source code
 
intersect(self, lists, name=None, description=None, tags=[])
Calculate the intersection of a given set of lists, and return the list representing the result
source code
 
union(self, lists, name=None, description=None, tags=[])
Calculate the union of a given set of lists, and return the list representing the result
source code
 
xor(self, lists, name=None, description=None, tags=[])
Calculate the symmetric difference of a given set of lists, and return the list representing the result
source code
 
subtract(self, lefts, rights, name=None, description=None, tags=[])
Calculate the subtraction of rights from lefts, and return the list representing the result
source code
 
_do_operation(self, path, operation, lists, name, description, tags) source code
 
make_list_names(self, lists)
Turn a list of things into a list of list names
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
 
safe_dict(d)
Recursively clone json structure with UTF-8 dictionary keys
source code
Class Variables [hide private]
  DEFAULT_LIST_NAME = 'my_list_'
  DEFAULT_DESCRIPTION = 'List created with Python client library'
  INTERSECTION_PATH = '/lists/intersect/json'
  UNION_PATH = '/lists/union/json'
  DIFFERENCE_PATH = '/lists/diff/json'
  SUBTRACTION_PATH = '/lists/subtract/json'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, service)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

get_list_count(self)

source code 

Return the number of lists accessible at the given webservice. This number will vary depending on who you are authenticated as.

create_list(self, content, list_type='', name=None, description=None, tags=[])

source code 

Create a new list in the webservice

If no name is given, the list will be considered to be a temporary list, and will be automatically deleted when the program ends. To prevent this happening, give the list a name, either on creation, or by renaming it.

Returns: intermine.lists.List