code stringlengths 1 18.2k |
|---|
def rest_name(cls): """ Represents a singular REST name """ if cls.__name__ == "NURESTRootObject" or cls.__name__ == "NURESTObject": return "Not Implemented" if cls.__rest_name__ is None: raise NotImplementedError('%s has no defined name. Implement rest_name property first.' % cls) return cls.__rest_name__ |
def resource_name(cls): """ Represents the resource name """ if cls.__name__ == "NURESTRootObject" or cls.__name__ == "NURESTObject": return "Not Implemented" if cls.__resource_name__ is None: raise NotImplementedError('%s has no defined resource name. Implement resource_name property first.' % cls) return cls.__resour... |
def _compute_args(self, data=dict(), **kwargs): """ Compute the arguments Try to import attributes from data. Otherwise compute kwargs arguments. Args: data: a dict() kwargs: a list of arguments """ for name, remote_attribute in self._attributes.items(): default_value = BambouConfig.get_default_attribute_value(self.__c... |
def children_rest_names(self): """ Gets the list of all possible children ReST names. Returns: list: list containing all possible rest names as string Example: >>> entity = NUEntity() >>> entity.children_rest_names ["foo", "bar"] """ names = [] for fetcher in self.fetchers: names.append(fetcher.__class__.managed_object... |
def get_resource_url(self): """ Get resource complete url """ name = self.__class__.resource_name url = self.__class__.rest_base_url() if self.id is not None: return "%s/%s/%s" % (url, name, self.id) return "%s/%s" % (url, name) |
def validate(self): """ Validate the current object attributes. Check all attributes and store errors Returns: Returns True if all attibutes of the object respect contraints. Returns False otherwise and store error in errors dict. """ self._attribute_errors = dict() # Reset validation errors for local_name, attribute i... |
{'title': 'Invalid input', 'description': 'This value is mandatory.', 'remote_name': attribute.remote_name} continue if value is None: continue # without error if not self._validate_type(local_name, attribute.remote_name, value, attribute.attribute_type): continue if attribute.min_length is not None and len(value) < at... |
len(value) > attribute.max_length: self._attribute_errors[local_name] = {'title': 'Invalid length', 'description': 'Attribute %s maximum length should be %s but is %s' % (attribute.remote_name, attribute.max_length, len(value)), 'remote_name': attribute.remote_name} continue if attribute.attribute_type == list: valid =... |
def expose_attribute(self, local_name, attribute_type, remote_name=None, display_name=None, is_required=False, is_readonly=False, max_length=None, min_length=None, is_identifier=False, choices=None, is_unique=False, is_email=False, is_login=False, is_editable=True, is_password=False, can_order=False, can_search=False, ... |
attribute.is_required = is_required attribute.is_readonly = is_readonly attribute.min_length = min_length attribute.max_length = max_length attribute.is_editable = is_editable attribute.is_identifier = is_identifier attribute.choices = choices attribute.is_unique = is_unique attribute.is_email = is_email attribute.is_l... |
def is_owned_by_current_user(self): """ Check if the current user owns the object """ from bambou.nurest_root_object import NURESTRootObject root_object = NURESTRootObject.get_default_root_object() return self._owner == root_object.id |
def parent_for_matching_rest_name(self, rest_names): """ Return parent that matches a rest name """ parent = self while parent: if parent.rest_name in rest_names: return parent parent = parent.parent_object return None |
def genealogic_types(self): """ Get genealogic types Returns: Returns a list of all parent types """ types = [] parent = self while parent: types.append(parent.rest_name) parent = parent.parent_object return types |
def genealogic_ids(self): """ Get all genealogic ids Returns: A list of all parent ids """ ids = [] parent = self while parent: ids.append(parent.id) parent = parent.parent_object return ids |
def get_formated_creation_date(self, format='%b %Y %d %H:%I:%S'): """ Return creation date with a given format. Default is '%b %Y %d %H:%I:%S' """ if not self._creation_date: return None date = datetime.datetime.utcfromtimestamp(self._creation_date) return date.strftime(format) |
def add_child(self, child): """ Add a child """ rest_name = child.rest_name children = self.fetcher_for_rest_name(rest_name) if children is None: raise InternalConsitencyError('Could not find fetcher with name %s while adding %s in parent %s' % (rest_name, child, self)) if child not in children: child.parent_object = s... |
def remove_child(self, child): """ Remove a child """ rest_name = child.rest_name children = self.fetcher_for_rest_name(rest_name) target_child = None for local_child in children: if local_child.id == child.id: target_child = local_child break if target_child: target_child.parent_object = None children.remove(target_ch... |
def update_child(self, child): """ Update child """ rest_name = child.rest_name children = self.fetcher_for_rest_name(rest_name) index = None for local_child in children: if local_child.id == child.id: index = children.index(local_child) break if index is not None: children[index] = child |
def to_dict(self): """ Converts the current object into a Dictionary using all exposed ReST attributes. Returns: dict: the dictionary containing all the exposed ReST attributes and their values. Example:: >>> print entity.to_dict() {"name": "my entity", "description": "Hello World", "ID": "xxxx-xxx-xxxx-xxx", ...} """ ... |
issue http://mvjira.mv.usa.alcatel.com/browse/VSD-5940 (12/15/2014) # if isinstance(value, bool): # value = int(value) if isinstance(value, NURESTObject): value = value.to_dict() if isinstance(value, list) and len(value) > 0 and isinstance(value[0], NURESTObject): tmp = list() for obj in value: tmp.append(obj.to_dict()... |
def from_dict(self, dictionary): """ Sets all the exposed ReST attribues from the given dictionary Args: dictionary (dict): dictionnary containing the raw object attributes and their values. Example: >>> info = {"name": "my group", "private": False} >>> group = NUGroup() >>> group.from_dict(info) >>> print "name: %s - ... |
Check if a local attribute is exposed with the remote_name # if no attribute is exposed, return None local_name = next((name for name, attribute in self._attributes.items() if attribute.remote_name == remote_name), None) if local_name: setattr(self, local_name, remote_value) else: # print('Attribute %s could not be add... |
def delete(self, response_choice=1, async=False, callback=None): """ Delete object and call given callback in case of call. Args: response_choice (int): Automatically send a response choice when confirmation is needed async (bool): Boolean to make an asynchronous call. Default is False callback (function): Callback met... |
return self._manage_child_object(nurest_object=self, method=HTTP_METHOD_DELETE, async=async, callback=callback, response_choice=response_choice) |
def save(self, response_choice=None, async=False, callback=None): """ Update object and call given callback in case of async call Args: async (bool): Boolean to make an asynchronous call. Default is False callback (function): Callback method that will be triggered in case of asynchronous call Example: >>> entity.name =... |
async=async, callback=callback, response_choice=response_choice) |
def send_request(self, request, async=False, local_callback=None, remote_callback=None, user_info=None): """ Sends a request, calls the local callback, then the remote callback in case of async call Args: request: The request to send local_callback: local method that will be triggered in case of async call remote_callb... |
Returns the object and connection (object, connection) """ callbacks = dict() if local_callback: callbacks['local'] = local_callback if remote_callback: callbacks['remote'] = remote_callback connection = NURESTConnection(request=request, async=async, callback=self._did_receive_response, callbacks=callbacks) connection.... |
def _manage_child_object(self, nurest_object, method=HTTP_METHOD_GET, async=False, callback=None, handler=None, response_choice=None, commit=False): """ Low level child management. Send given HTTP method with given nurest_object to given ressource of current object Args: nurest_object: the NURESTObject object to manage... |
commit: True to auto commit changes in the current object Returns: Returns the object and connection (object, connection) """ url = None if method == HTTP_METHOD_POST: url = self.get_resource_url_for_child_type(nurest_object.__class__) else: url = self.get_resource_url() if response_choice is not None: url += '?respons... |
async=async, local_callback=handler, remote_callback=callback, user_info=user_info) else: connection = self.send_request(request=request, user_info=user_info) return handler(connection) |
def _did_receive_response(self, connection): """ Receive a response from the connection """ if connection.has_timeouted: bambou_logger.info("NURESTConnection has timeout.") return has_callbacks = connection.has_callbacks() should_post = not has_callbacks if connection.handle_response_for_connection(should_post=should_p... |
def _did_retrieve(self, connection): """ Callback called after fetching the object """ response = connection.response try: self.from_dict(response.data[0]) except: pass return self._did_perform_standard_operation(connection) |
def _did_perform_standard_operation(self, connection): """ Performs standard opertions """ if connection.async: callback = connection.callbacks['remote'] if connection.user_info and 'nurest_object' in connection.user_info: callback(connection.user_info['nurest_object'], connection) else: callback(self, connection) else... |
self.add_child(connection.user_info['nurest_object']) return (connection.user_info['nurest_object'], connection) return (self, connection) |
def create_child(self, nurest_object, response_choice=None, async=False, callback=None, commit=True): """ Add given nurest_object to the current object For example, to add a child into a parent, you can call parent.create_child(nurest_object=child) Args: nurest_object (bambou.NURESTObject): the NURESTObject object to a... |
the connection Returns: Returns the object and connection (object, connection) Example: >>> entity = NUEntity(name="Super Entity") >>> parent_entity.create_child(entity) # the new entity as been created in the parent_entity """ # if nurest_object.id: # raise InternalConsitencyError("Cannot create a child that already h... |
def instantiate_child(self, nurest_object, from_template, response_choice=None, async=False, callback=None, commit=True): """ Instantiate an nurest_object from a template object Args: nurest_object: the NURESTObject object to add from_template: the NURESTObject template object callback: callback containing the object a... |
# create a NUOtherEntityTemplate with an existing ID (or retrieve one) >>> other_entity_instance = NUOtherEntityInstance(name="my new instance") # create a new NUOtherEntityInstance to be intantiated from other_entity_template >>> >>> parent_entity.instantiate_child(other_entity_instance, other_entity_template) # insta... |
child from a template with no ID: %s." % from_template) nurest_object.template_id = from_template.id return self._manage_child_object(nurest_object=nurest_object, async=async, method=HTTP_METHOD_POST, callback=callback, handler=self._did_create_child, response_choice=response_choice, commit=commit) |
def _did_create_child(self, connection): """ Callback called after adding a new child nurest_object """ response = connection.response try: connection.user_info['nurest_object'].from_dict(response.data[0]) except Exception: pass return self._did_perform_standard_operation(connection) |
def assign(self, objects, nurest_object_type, async=False, callback=None, commit=True): """ Reference a list of objects into the current resource Args: objects (list): list of NURESTObject to link nurest_object_type (type): Type of the object to link callback (function): Callback method that should be fired at the end ... |
entity3 are now part of the entity """ ids = list() for nurest_object in objects: ids.append(nurest_object.id) url = self.get_resource_url_for_child_type(nurest_object_type) request = NURESTRequest(method=HTTP_METHOD_PUT, url=url, data=ids) user_info = {'nurest_objects': objects, 'commit': commit} if async: return self... |
def rest_equals(self, rest_object): """ Compare objects REST attributes """ if not self.equals(rest_object): return False return self.to_dict() == rest_object.to_dict() |
def equals(self, rest_object): """ Compare with another object """ if self._is_dirty: return False if rest_object is None: return False if not isinstance(rest_object, NURESTObject): raise TypeError('The object is not a NURESTObject %s' % rest_object) if self.rest_name != rest_object.rest_name: return False if self.id a... |
def get_ip_address(request): """ Correct IP address is expected as first element of HTTP_X_FORWARDED_FOR or REMOTE_ADDR """ if 'HTTP_X_FORWARDED_FOR' in request.META: return request.META['HTTP_X_FORWARDED_FOR'].split(',')[0].strip() else: return request.META['REMOTE_ADDR'] |
def get_estimates_without_scope_in_month(self, customer): """ It is expected that valid row for each month contains at least one price estimate for customer, service setting, service, service project link, project and resource. Otherwise all price estimates in the row should be deleted. """ estimates = self.get_price_e... |
date = (estimate.year, estimate.month) dates.add(date) cls = estimate.content_type.model_class() for model, table in tables.items(): if issubclass(cls, model): table[date].append(estimate) break invalid_estimates = [] for date in dates: if any(map(lambda table: len(table[date]) == 0, tables.values())): for table in tab... |
def is_identifier(self, is_identifier): """ Setter for is_identifier """ if is_identifier: self.is_editable = False self._is_identifier = is_identifier |
def is_password(self, is_password): """ Setter for is_identifier """ if is_password: self.is_forgetable = True self._is_password = is_password |
def choices(self, choices): """ Setter for is_identifier """ if choices is not None and len(choices) > 0: self.has_choices = True self._choices = choices |
def get_default_value(self): """ Get a default value of the attribute_type """ if self.choices: return self.choices[0] value = self.attribute_type() if self.attribute_type is time: value = int(value) elif self.attribute_type is str: value = "A" if self.min_length: if self.attribute_type is str: value = value.ljust(self... |
= self.max_length return value |
def get_min_value(self): """ Get the minimum value """ value = self.get_default_value() if self.attribute_type is str: min_value = value[:self.min_length - 1] elif self.attribute_type is int: min_value = self.min_length - 1 else: raise TypeError('Attribute %s can not have a minimum value' % self.local_name) return min_... |
def get_max_value(self): """ Get the maximum value """ value = self.get_default_value() if self.attribute_type is str: max_value = value.ljust(self.max_length + 1, 'a') elif self.attribute_type is int: max_value = self.max_length + 1 else: raise TypeError('Attribute %s can not have a maximum value' % self.local_name) r... |
def get_api_root_view(self, api_urls=None): """ Return a basic root view. """ api_root_dict = OrderedDict() list_name = self.routes[0].name for prefix, viewset, basename in self.registry: api_root_dict[prefix] = list_name.format(basename=basename) class APIRootView(views.APIView): _ignore_model_permissions = True exclu... |
+ url_name try: ret[key] = reverse( url_name, args=args, kwargs=kwargs, request=request, format=kwargs.get('format', None) ) except NoReverseMatch: # Don't bail out if eg. no list routes exist, only detail routes. continue return Response(ret) return APIRootView.as_view() |
def get_default_base_name(self, viewset): """ Attempt to automatically determine base name using `get_url_name`. """ queryset = getattr(viewset, 'queryset', None) if queryset is not None: get_url_name = getattr(queryset.model, 'get_url_name', None) if get_url_name is not None: return get_url_name() return super(SortedD... |
def change_customer_nc_users_quota(sender, structure, user, role, signal, **kwargs): """ Modify nc_user_count quota usage on structure role grant or revoke """ assert signal in (signals.structure_role_granted, signals.structure_role_revoked), \ 'Handler "change_customer_nc_users_quota" has to be used only with structur... |
customer_users = customer.get_users() customer.set_quota_usage(Customer.Quotas.nc_user_count, customer_users.count()) |
def delete_service_settings_on_service_delete(sender, instance, **kwargs): """ Delete not shared service settings without services """ service = instance try: service_settings = service.settings except ServiceSettings.DoesNotExist: # If this handler works together with delete_service_settings_on_scope_delete # it tries... |
def delete_service_settings_on_scope_delete(sender, instance, **kwargs): """ If VM that contains service settings were deleted - all settings resources could be safely deleted from NC. """ for service_settings in ServiceSettings.objects.filter(scope=instance): service_settings.unlink_descendants() service_settings.dele... |
def url(self, url): """ Set API URL endpoint Args: url: the url of the API endpoint """ if url and url.endswith('/'): url = url[:-1] self._url = url |
def get_authentication_header(self, user=None, api_key=None, password=None, certificate=None): """ Return authenication string to place in Authorization Header If API Token is set, it'll be used. Otherwise, the clear text password will be sent. Users of NURESTLoginController are responsible to clean the password proper... |
api_key = self.api_key if not password: password = self.password if not password: password = self.password if not certificate: certificate = self._certificate if certificate: return "XREST %s" % urlsafe_b64encode("{}:".format(user).encode('utf-8')).decode('utf-8') if api_key: return "XREST %s" % urlsafe_b64encode("{}:{... |
def reset(self): """ Reset controller It removes all information about previous session """ self._is_impersonating = False self._impersonation = None self.user = None self.password = None self.api_key = None self.enterprise = None self.url = None |
def impersonate(self, user, enterprise): """ Impersonate a user in a enterprise Args: user: the name of the user to impersonate enterprise: the name of the enterprise where to use impersonation """ if not user or not enterprise: raise ValueError('You must set a user name and an enterprise name to begin impersonificatio... |
def equals(self, controller): """ Verify if the controller corresponds to the current one. """ if controller is None: return False return self.user == controller.user and self.enterprise == controller.enterprise and self.url == controller.url |
def create_application(server, root_url): """ WSGI adapter. It creates a simple WSGI application, that can be used with any WSGI server. The arguments are: #. ``server`` is a pyws server object, #. ``root_url`` is an URL to which the server will be bound. An application created by the function transforms WSGI environme... |
gets the response, sets header ``Content-Type`` and returns response text. """ def serve(environ, start_response): root = root_url.lstrip('/') tail, get = (util.request_uri(environ).split('?') + [''])[:2] tail = tail[len(util.application_uri(environ)):] tail = tail.lstrip('/') result = [] content_type = 'text/plain' st... |
post = parse_qs(text) response = server.process_request( Request(tail, text, get, post, {})) content_type = response.content_type status = get_http_response_code(response) result.append(response.text) headers = [('Content-type', content_type)] start_response(status, headers) return result return serve |
def compiler_dialect(paramstyle='named'): """ 构建dialect """ dialect = SQLiteDialect_pysqlite( json_serializer=json.dumps, json_deserializer=json_deserializer, paramstyle=paramstyle ) dialect.default_paramstyle = paramstyle dialect.statement_compiler = ACompiler_sqlite return dialect |
def create_engine( database, minsize=1, maxsize=10, loop=None, dialect=_dialect, paramstyle=None, **kwargs): """ A coroutine for Engine creation. Returns Engine instance with embedded connection pool. The pool has *minsize* opened connections to sqlite3. """ coro = _create_engine( database=database, minsize=minsize, ma... |
def release(self, conn): """Revert back connection to pool.""" if conn.in_transaction: raise InvalidRequestError( "Cannot release a connection with " "not finished transaction" ) raw = conn.connection res = yield from self._pool.release(raw) return res |
def get_configuration(cls, resource): """ Return how much consumables are used by resource with current configuration. Output example: { <ConsumableItem instance>: <usage>, <ConsumableItem instance>: <usage>, ... } """ strategy = cls._get_strategy(resource.__class__) return strategy.get_configuration(resource) |
def close(self): """Close this ResultProxy. Closes the underlying DBAPI cursor corresponding to the execution. Note that any data cached within this ResultProxy is still available. For some types of results, this may include buffered rows. If this ResultProxy was generated from an implicit execution, the underlying Con... |
automatically when: * all result rows are exhausted using the fetchXXX() methods. * cursor.description is None. """ if not self._closed: self._closed = True yield from self._cursor.close() # allow consistent errors self._cursor = None self._weak = None else: # pragma: no cover pass |
def get_version(): """Obtain the version number""" import imp import os mod = imp.load_source( 'version', os.path.join('skdata', '__init__.py') ) return mod.__version__ |
def accept(self, request, uuid=None): """ Accept invitation for current user. To replace user's email with email from invitation - add parameter 'replace_email' to request POST body. """ invitation = self.get_object() if invitation.state != models.Invitation.State.PENDING: raise ValidationError(_('Only pending invitati... |
this project.')) elif invitation.customer.has_user(request.user): raise ValidationError(_('User already has role within this customer.')) if settings.WALDUR_CORE['VALIDATE_INVITATION_EMAIL'] and invitation.email != request.user.email: raise ValidationError(_('Invitation and user emails mismatch.')) replace_email = bool... |
def scope_deletion(sender, instance, **kwargs): """ Run different actions on price estimate scope deletion. If scope is a customer - delete all customer estimates and their children. If scope is a deleted resource - redefine consumption details, recalculate ancestors estimates and update estimate details. If scope is a... |
price estimate details. """ is_resource = isinstance(instance, structure_models.ResourceMixin) if is_resource and getattr(instance, 'PERFORM_UNLINK', False): _resource_unlink(resource=instance) elif is_resource and not getattr(instance, 'PERFORM_UNLINK', False): _resource_deletion(resource=instance) elif isinstance(ins... |
def _resource_deletion(resource): """ Recalculate consumption details and save resource details """ if resource.__class__ not in CostTrackingRegister.registered_resources: return new_configuration = {} price_estimate = models.PriceEstimate.update_resource_estimate(resource, new_configuration) price_estimate.init_detail... |
def resource_update(sender, instance, created=False, **kwargs): """ Update resource consumption details and price estimate if its configuration has changed. Create estimates for previous months if resource was created not in current month. """ resource = instance try: new_configuration = CostTrackingRegister.get_config... |
def resource_quota_update(sender, instance, **kwargs): """ Update resource consumption details and price estimate if its configuration has changed """ quota = instance resource = quota.scope try: new_configuration = CostTrackingRegister.get_configuration(resource) except ResourceNotRegisteredError: return models.PriceE... |
def _create_historical_estimates(resource, configuration): """ Create consumption details and price estimates for past months. Usually we need to update historical values on resource import. """ today = timezone.now() month_start = core_utils.month_start(today) while month_start > resource.created: month_start -= relat... |
def IPYTHON_MAIN(): """Decide if the Ipython command line is running code.""" import pkg_resources runner_frame = inspect.getouterframes(inspect.currentframe())[-2] return ( getattr(runner_frame, "function", None) == pkg_resources.load_entry_point("ipython", "console_scripts", "ipython").__name__ ) |
def register_model(cls, model): """ Register a model class according to its remote name Args: model: the model to register """ rest_name = model.rest_name resource_name = model.resource_name if rest_name not in cls._model_rest_name_registry: cls._model_rest_name_registry[rest_name] = [model] cls._model_resource_name_re... |
def get_first_model_with_rest_name(cls, rest_name): """ Get the first model corresponding to a rest_name Args: rest_name: the rest name """ models = cls.get_models_with_rest_name(rest_name) if len(models) > 0: return models[0] return None |
def get_first_model_with_resource_name(cls, resource_name): """ Get the first model corresponding to a resource_name Args: resource_name: the resource name """ models = cls.get_models_with_resource_name(resource_name) if len(models) > 0: return models[0] return None |
def run(self): """ 执行任务 """ while not self._stoped: self._tx_event.wait() self._tx_event.clear() try: func = self._tx_queue.get_nowait() if isinstance(func, str): self._stoped = True self._rx_queue.put('closed') self.notice() break except Empty: # pragma: no cover continue try: result = func() self._rx_queue.put(result... |
def build_layout(self, dset_id: str): """ :param dset_id: :return: """ all_fields = list(self.get_data(dset_id=dset_id).keys()) try: field_reference = self.skd[dset_id].attrs('target') except: field_reference = all_fields[0] fields_comparison = [all_fields[1]] # chart type widget self.register_widget( chart_type=widget... |
field_reference], value=fields_comparison ) ) # field reference widget self.register_widget( y=widgets.Dropdown( description='Y:', options=all_fields, value=field_reference ) ) # used to internal flow control y_changed = [False] self.register_widget( box_filter_panel=widgets.VBox([ self._('y'), self._('xs'), self._('bi... |
xs field should be updated and data table and chart should be displayed/updated. :param change: :return: """ # remove reference field from the comparison field list _xs = [ f for f in all_fields if not f == change['new'] ] y_changed[0] = True # flow control variable _xs_value = list(self._('xs').value) if change['new']... |
self._('xs').value = _xs_value self._display_result(y=change['new'], dset_id=dset_id) y_changed[0] = False # flow control variable # widgets registration # change tab settings self._('tab').set_title(0, 'Filter') self._('tab').set_title(1, 'Data') self._('tab').set_title(2, 'Chart') # data panel self._('table').value =... |
( self._display_result(xs=change['new'], dset_id=dset_id) if not y_changed[0] else None ), 'value' ) self._('chart_type').observe( lambda change: ( self._display_result(chart_type=change['new'], dset_id=dset_id) ), 'value' ) |
def display(self, dset_id: str): """ :param dset_id: :return: """ # update result self.skd[dset_id].compute() # build layout self.build_layout(dset_id=dset_id) # display widgets display(self._('dashboard')) # display data table and chart self._display_result(dset_id=dset_id) |
def find_spec(self, fullname, target=None): """Try to finder the spec and if it cannot be found, use the underscore starring syntax to identify potential matches. """ spec = super().find_spec(fullname, target=target) if spec is None: original = fullname if "." in fullname: original, fullname = fullname.rsplit(".", 1) e... |
spec = super().find_spec( (original + "." + file.stem.split(".", 1)[0]).lstrip("."), target=target ) fullname = (original + "." + fullname).lstrip(".") if spec and fullname != spec.name: spec = FuzzySpec( spec.name, spec.loader, origin=spec.origin, loader_state=spec.loader_state, alias=fullname, is_package=bool(spec.su... |
def get_resource_url(self): """ Get resource complete url """ name = self.__class__.resource_name url = self.__class__.rest_base_url() return "%s/%s" % (url, name) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.