SearchableCollection Usage Guide

Simple Access

you may access a Searchablelist exactly the same as a normal list for the most part

1
2
3
4
5
6
7
from searchable_collection import SearchableCollection
some_other_list = [1,2,3,4,5,6]
my_list = SearchableCollection(some_other_list)
print(my_list[2],my_list[-1])  # 3 and 6
print(len(my_list),my_list.pop(3),len(my_list))
my_list.append(5)
print(len(my_list),my_list[-1])

Adding Element To Searchable List

you should be able to add elements to a Searchable list the same as if it were a normal list

1
2
3
4
5
from searchable_collection import SearchableCollection

my_list = SearchableCollection()
my_list.append(4)
my_list.extend(["a",66,{'asd':'dsa','b':5}])

Searching For Elements

this is really the whole purpose of this module, to provide a flexible ORM like interface to searching though lists I doubt its super efficient, so i wouldnt recommend using it with huge lists, but it should be able to search a few hundred records near instantly

See also

Query Reference