def get_all(resource):
    ''' Return all of a single resource '''
    QUERYSETS = {
        settings.PEOPLE: PeopleQuerySet,
        settings.PLANETS: PlanetQuerySet,
        settings.STARSHIPS: StarshipQuerySet,
        settings.VEHICLES: VehicleQuerySet,
        settings.SPECIES: SpeciesQuerySet,
        settings.FILMS: FilmQuerySet
    }

    urls = all_resource_urls(
        "{0}/{1}/".format(settings.BASE_URL, resource)
    )

    return QUERYSETS[resource](urls)
def get_all ( resource ) : QUERYSETS = { settings . PEOPLE : PeopleQuerySet , settings . PLANETS : PlanetQuerySet , settings . STARSHIPS : StarshipQuerySet , settings . VEHICLES : VehicleQuerySet , settings . SPECIES : SpeciesQuerySet , settings . FILMS : FilmQuerySet } urls = all_resource_urls ( "{0}/{1}/" . format ( settings . BASE_URL , resource ) ) return QUERYSETS [ resource ] ( urls )
Return all of a single resource