galaxy.quota package

Galaxy Quotas

class galaxy.quota.NoQuotaAgent(model)[source]

Bases: object

Base quota agent, always returns no quota

__init__(model)[source]
get_quota(user, nice_size=False)[source]
default_quota
get_usage(trans=None, user=False, history=False)[source]
get_percent(trans=None, user=False, history=False, usage=False, quota=False)[source]
get_user_quotas(user)[source]
class galaxy.quota.QuotaAgent(model)[source]

Bases: galaxy.quota.NoQuotaAgent

Class that handles galaxy quotas

get_quota(user, nice_size=False)[source]

Calculated like so:

  1. Anonymous users get the default quota.
  2. Logged in users start with the highest of their associated ‘=’ quotas or the default quota, if there are no associated ‘=’ quotas. If an ‘=’ unlimited (-1 in the database) quota is found during this process, the user has no quota (aka unlimited).
  3. Quota is increased or decreased by any corresponding ‘+’ or ‘-‘ quotas.
default_unregistered_quota
default_registered_quota
set_default_quota(default_type, quota)[source]
get_percent(trans=None, user=False, history=False, usage=False, quota=False)[source]

Return the percentage of any storage quota applicable to the user/transaction.

set_entity_quota_associations(quotas=[], users=[], groups=[], delete_existing_assocs=True)[source]
get_user_quotas(user)[source]