Did I find the right examples for you? yes no

All Samples(6)  |  Call(3)  |  Derive(0)  |  Import(3)
Create a connection object from a dsn in the form

    InterfaceName://host1:port1+host2:port2?opt1=val1&opt2=val2#connection_name

example -- connect to nsq with 2 lookupd instances

    morp.interface.nsq.Nsq://host1.com:4161+host2.com:4161#nsq

src/m/o/morp-0.1/morp/__init__.py   morp(Download)
import nsq
 
from .config import DsnConnection, Connection
from . import decorators
from . import interface
 
    global connections
    c = DsnConnection(dsn)
    i_classname = interface.get_class(c.interface_name)
    set_interface(c.name, i_classname(c))

src/p/r/prom-0.9.50/prom/__init__.py   prom(Download)
# stdlib
import os
 
# first party
from .config import DsnConnection, Schema, Field
    #global interfaces
 
    c = DsnConnection(dsn)
    if c.name in get_interfaces():
        raise ValueError('a connection named "{}" has already been configured'.format(c.name))

src/p/r/prom-HEAD/prom/__init__.py   prom(Download)
# stdlib
import os
 
# first party
from .config import DsnConnection, Schema, Field
    #global interfaces
 
    c = DsnConnection(dsn)
    if c.name in get_interfaces():
        raise ValueError('a connection named "{}" has already been configured'.format(c.name))