Fetch and instantiate a single resource from a path.
544116
def get(request_path, klass)
      response = session.send_request('GET', path + request_path)
      data = response.fetch(klass.tag)
      resource = klass.new(data.merge(parent: self))
      resource.assign_errors(response)
      resource
    end
565559
def get(self, path, params=None):
        """"""
        r = requests.get(url=self.url + path, params=params, timeout=self.timeout)
        r.raise_for_status()
        return r.json()
542978
def download(self, path):
        """"""
        service_get_resp = requests.get(self.location, cookies={"session": self.session})
        payload = service_get_resp.json()
        self._state = payload["status"]

        if self._state != "processed":
            raise errors.ResourceError("slice resource status is: {}".format(self._state))
        else:
            download_get_resp = requests.get(payload["content"])
            with open(path, "wb") as model_file:
                model_file.write(download_get_resp.content)
1171684
private WebResource getResource(WebResource service, APIInfo api, String... pathParams) {
        WebResource resource = service.path(api.getPath());
        resource = appendPathParams(resource, pathParams);
        return resource;
    }
613589
def get_object(self, path):
        """"""
        obj = self.native_container.get_object(path)
        return self.obj_cls.from_obj(self, obj)
1188663
def get(self, path, query=None, redirects=True):
        
        return self.request('GET', path, query, None, redirects)
73778
async def get_resource(self, resource_id: int) -> dict:
        """"""
        resource = await self.request.get(
            join_path(self._base_path, str(resource_id))
        )
        self._sanitize_resource(self._get_to_actual_data(resource))
        return resource
221777
def _fetch(self):
        """"""
        if 'uri' in self._meta_data:
            error = "There was an attempt to assign a new uri to this "\
                    "resource, the _meta_data['uri'] is %s and it should"\
                    " not be changed." % (self._meta_data['uri'])
            raise URICreationCollision(error)
        # Make convenience variable with short names for this method.
        _create_uri = self._meta_data['container']._meta_data['uri']
        session = self._meta_data['bigip']._meta_data['icr_session']
        # Invoke the REST operation on the device.
        response = session.post(_create_uri, json={})
        # Make new instance of self
        return self._produce_instance(response)
982485
def from_file(cls, path, environ):
        
        instance = cls()
        instance.read(path, environ)
        return instance
123710
def get(self, path, default=None):
        

        try:
            return self.__getitem__(path)
        except KeyError as error:
            return default
1321159
public JSONObject get(String path) throws APIError {
        return request(Verb.GET, path, null);
    }
20325
public InputStream getResource (String path)
        throws IOException
    {
        String localePath = getLocalePath(path);
        InputStream in;

        // first look for this resource in our default resource bundle
        for (ResourceBundle bundle : _default) {
            // Try a localized version first.
            if (localePath != null) {
                in = bundle.getResource(localePath);
                if (in != null) {
                    return in;
                }
            }
            // If that didn't work, try generic.
            in = bundle.getResource(path);
            if (in != null) {
                return in;
            }
        }

        // fallback next to an unpacked resource file
        File file = getResourceFile(path);
        if (file != null && file.exists()) {
            return new FileInputStream(file);
        }

        // if we still didn't find anything, try the classloader; first try a locale-specific file
        if (localePath != null) {
            in = getInputStreamFromClasspath(PathUtil.appendPath(_rootPath, localePath));
            if (in != null) {
                return in;
            }
        }

        // if we didn't find that, try locale-neutral
        in = getInputStreamFromClasspath(PathUtil.appendPath(_rootPath, path));
        if (in != null) {
            return in;
        }

        // if we still haven't found it, we throw an exception
        throw new FileNotFoundException("Unable to locate resource [path=" + path + "]");
    }
515711
def get_one(self, request, **kwargs):
        """"""
        resource = request.match_info.get(self.name)
        if not resource:
            return None

        try:
            return self.collection.where(self.meta.model_pk == resource).get()
        except Exception:
            raise RESTNotFound(reason='Resource not found.')
1143825
def get_resource(request):
    """"""
    hash = request.matchdict['hash']

    # Do the file lookup
    with db_connect() as db_connection:
        with db_connection.cursor() as cursor:
            args = dict(hash=hash)
            cursor.execute(SQL['get-resource'], args)
            try:
                mimetype, file = cursor.fetchone()
            except TypeError:  # None returned
                raise httpexceptions.HTTPNotFound()

    resp = request.response
    resp.status = "200 OK"
    resp.content_type = mimetype
    resp.body = file[:]
    return resp
620853
def from_path(cls, path):
        """"""
        f = GitFile(path, 'rb')
        try:
            ret = cls.from_file(f)
            ret.path = path
            return ret
        finally:
            f.close()
555011
public static void get(@NotNull String path, @NotNull Handler handler) {
        staticInstance().get(prefixPath(path), handler);
    }
894955
def get(self, path, data=None):
        """"""
        data = data or {}
        response = requests.get(self.url(path), params=data, headers=self.request_header())
        return self.parse_response(response)