tldap.query

Used to perform LDAP queries.

class tldap.query.EmptyQuerySet(cls, alias, settings, base_dn)[source]

Represents an empty query set with no results.

all()[source]

Always returns EmptyQuerySet.

exclude(*args, **kwargs)[source]

Always returns EmptyQuerySet.

filter(*args, **kwargs)[source]

Always returns EmptyQuerySet.

class tldap.query.QuerySet(cls, using, settings, base_dn)[source]

Represents a lazy database lookup for a set of objects.

create(**kwargs)[source]

Creates a new object with the given kwargs, saving it to the database and returning the created object.

exclude(*args, **kwargs)[source]

Returns a new QuerySet instance with NOT (args) ANDed to the existing set.

filter(*args, **kwargs)[source]

Returns a new QuerySet instance with the args ANDed to the existing set.

get(*args, **kwargs)[source]

Performs the query and returns a single object matching the given keyword arguments.

get_or_create(**kwargs)[source]

Looks up an object with the given kwargs, creating one if necessary. Returns a tuple of (object, created), where created is a boolean specifying whether an object was created.

iterator()[source]

An iterator over the results from applying this QuerySet to the database.

none()[source]

Returns an empty QuerySet.

using(using, settings=None)[source]

Selects which database this QuerySet should excecute it’s query against.

Previous topic

tldap.options

Next topic

tldap.query_utils

This Page