Did I find the right examples for you? yes no

All Samples(21)  |  Call(21)  |  Derive(0)  |  Import(0)
Returns a :class:`pyesgf.search.context.SearchContext` class for 
performing faceted searches.

See :meth:`SearchContext.__init__()` for documentation on the 
arguments.

src/c/d/cdb_query-0.9.6/lib/esgf_query.py   cdb_query(Download)
 
    #Search the ESGF:
    ctx = conn.new_context(project=nc_Database.drs.project,
                        experiment=experiment)
    ctx=ctx.constrain(**{field:var_desc[field_id] for field_id, field in enumerate(nc_Database.drs.var_specs)})

src/e/s/esgf-pyclient-0.1.2/test/test_context.py   esgf-pyclient(Download)
def test_context_freetext():
    conn = SearchConnection(TEST_SERVICE)
    context = conn.new_context(query="temperature")
 
    assert context.freetext_constraint == "temperature"
 
def test_context_facets1():
    conn = SearchConnection(TEST_SERVICE)
    context = conn.new_context(project='cmip5')
def test_context_facets1():
    conn = SearchConnection(TEST_SERVICE)
    context = conn.new_context(project='CMIP5')
 
    context2 = context.constrain(model="IPSL-CM5A-LR")
def test_context_facets_multivalue():
    conn = SearchConnection(TEST_SERVICE)
    context = conn.new_context(project='CMIP5')
 
    context2 = context.constrain(model=['IPSL-CM5A-LR', 'IPSL-CM5A-MR'])
def test_context_facet_multivalue2():
    conn = SearchConnection(TEST_SERVICE)
    context = conn.new_context(project='CMIP5', model='IPSL-CM5A-MR')
    assert context.facet_constraints.getall('model') == ['IPSL-CM5A-MR']
 

src/e/s/esgf-pyclient-0.1.2/test/test_opendap.py   esgf-pyclient(Download)
 
        #!TODO: replace with request for specific dataset
        ctx = conn.new_context(project='CMIP5')
        results = ctx.search()