Skip to content

Resources

An object to provide access to package resources to the user

Source code in callingcardstools/Resources/Resources.py
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
class Resources:
    """An object to provide access to package resources to the user"""

    def __init__(self) -> None:

        self._configured_organisms = ['yeast', 'mammals']

        self._yeast = {
            'barcode_details':
                pkg_resources.read_text(yeast, "barcode_details.json")
        }

        self._mammals = {
            'barcode_details':
                pkg_resources.read_text(mammals, "barcode_details.json"),
        }

    @property
    def configured_organisms(self):
        """list of organisms for which there are resources"""
        return self._configured_organisms

    @property
    def yeast(self):
        """dict of paths to resources for yeast"""
        return self._yeast

    @property
    def mammals(self):
        """dict of paths to resources for mammals"""
        return self._mammals

configured_organisms property

list of organisms for which there are resources

mammals property

dict of paths to resources for mammals

yeast property

dict of paths to resources for yeast