Search is not available for this dataset
text stringlengths 75 104k |
|---|
def mkstemp(self, suffix, prefix, directory=None):
"""
Generate temp file name in artifacts base dir
and close temp file handle
"""
if not directory:
directory = self.artifacts_dir
fd, fname = tempfile.mkstemp(suffix, prefix, directory)
os.close(fd)
... |
def close(self):
"""
Call close() for all plugins
"""
logger.info("Close allocated resources...")
for plugin in self.plugins.values():
logger.debug("Close %s", plugin)
try:
plugin.close()
except Exception as ex:
... |
def load_files(self, configs):
""" Read configs set into storage """
logger.debug("Reading configs: %s", configs)
config_filenames = [resource.resource_filename(config) for config in configs]
try:
self.config.read(config_filenames)
except Exception as e... |
def flush(self, filename=None):
""" Flush current stat to file """
if not filename:
filename = self.file
if filename:
with open(filename, 'w') as handle:
self.config.write(handle) |
def get_options(self, section, prefix=''):
""" Get options list with requested prefix """
res = []
try:
for option in self.config.options(section):
if not prefix or option.find(prefix) == 0:
res += [(
option[len(prefix):], s... |
def find_sections(self, prefix):
""" return sections with specified prefix """
res = []
for section in self.config.sections():
if section.startswith(prefix):
res.append(section)
return res |
def _decode_stat_data(self, chunk):
"""
Return all items found in this chunk
"""
for date_str, statistics in chunk.iteritems():
date_obj = datetime.datetime.strptime(
date_str.split(".")[0], '%Y-%m-%d %H:%M:%S')
chunk_date = int(time.mktime(date_ob... |
def phantom(self):
"""
:rtype: PhantomConfig
"""
if not self._phantom:
self._phantom = PhantomConfig(self.core, self.cfg, self.stat_log)
self._phantom.read_config()
return self._phantom |
def get_info(self):
""" returns info object """
if not self.cached_info:
if not self.phantom:
return None
self.cached_info = self.phantom.get_info()
return self.cached_info |
def prepare(self):
"""Prepare for monitoring - install agents etc"""
# Parse config
agent_configs = []
if self.config:
agent_configs = self.config_manager.getconfig(
self.config, self.default_target)
# Creating agent for hosts
for config in a... |
def start(self):
""" Start agents
execute popen of agent.py on target and start output reader thread.
"""
[agent.start() for agent in self.agents]
[agent.reader_thread.start() for agent in self.agents] |
def poll(self):
""" Poll agents for data
"""
start_time = time.time()
for agent in self.agents:
for collect in agent.reader:
# don't crush if trash or traceback came from agent to stdout
if not collect:
return 0
... |
def stop(self):
"""Shutdown agents"""
logger.debug("Uninstalling monitoring agents")
for agent in self.agents:
log_filename, data_filename = agent.uninstall()
self.artifact_files.append(log_filename)
self.artifact_files.append(data_filename)
for agent ... |
def send_collected_data(self):
"""sends pending data set to listeners"""
data = self.__collected_data
self.__collected_data = []
for listener in self.listeners:
# deep copy to ensure each listener gets it's own copy
listener.monitoring_data(copy.deepcopy(data)) |
def __detect_configuration(self):
"""
we need to be flexible in order to determine which plugin's configuration
specified and make appropriate configs to metrics collector
:return: SECTION name or None for defaults
"""
try:
is_telegraf = self.core.get_option(... |
def __handle_data_items(self, host, data):
""" store metric in data tree and calc offset signs
sign < 0 is CYAN, means metric value is lower then previous,
sign > 1 is YELLOW, means metric value is higher then prevoius,
sign == 0 is WHITE, means initial or equal metric value
"""... |
def _decode_agents_data(self, block):
"""
decode agents jsons, count diffs
"""
collect = []
if block:
for chunk in block.split('\n'):
try:
if chunk:
prepared_results = {}
jsn = json.lo... |
async def subscribe(self, channels):
'''Start subscribing channels.
If the necessary connection isn't open yet, it opens now.
'''
ws_channels = []
nats_channels = []
for c in channels:
if c.startswith(('Q.', 'T.', 'A.', 'AM.',)):
nats_channels.... |
def run(self, initial_channels=[]):
'''Run forever and block until exception is rasised.
initial_channels is the channels to start with.
'''
loop = asyncio.get_event_loop()
try:
loop.run_until_complete(self.subscribe(initial_channels))
loop.run_forever()
... |
async def close(self):
'''Close any of open connections'''
if self._ws is not None:
await self._ws.close()
if self.polygon is not None:
await self.polygon.close() |
def df(self):
'''## Experimental '''
if not hasattr(self, '_df'):
dfs = []
for symbol, bars in self.items():
df = bars.df.copy()
df.columns = pd.MultiIndex.from_product(
[[symbol, ], df.columns])
dfs.append(df)
... |
def _one_request(self, method, url, opts, retry):
'''
Perform one request, possibly raising RetryException in the case
the response is 429. Otherwise, if error text contain "code" string,
then it decodes to json object and returns APIError.
Returns the body json in the 200 status... |
def list_orders(self, status=None, limit=None, after=None, until=None,
direction=None, params=None):
'''
Get a list of orders
https://docs.alpaca.markets/web-api/orders/#get-a-list-of-orders
'''
if params is None:
params = dict()
if limit i... |
def submit_order(self, symbol, qty, side, type, time_in_force,
limit_price=None, stop_price=None, client_order_id=None):
'''Request a new order'''
params = {
'symbol': symbol,
'qty': qty,
'side': side,
'type': type,
'time_i... |
def get_order(self, order_id):
'''Get an order'''
resp = self.get('/orders/{}'.format(order_id))
return Order(resp) |
def get_position(self, symbol):
'''Get an open position'''
resp = self.get('/positions/{}'.format(symbol))
return Position(resp) |
def list_assets(self, status=None, asset_class=None):
'''Get a list of assets'''
params = {
'status': status,
'assert_class': asset_class,
}
resp = self.get('/assets', params)
return [Asset(o) for o in resp] |
def get_asset(self, symbol):
'''Get an asset'''
resp = self.get('/assets/{}'.format(symbol))
return Asset(resp) |
def get_barset(self,
symbols,
timeframe,
limit=None,
start=None,
end=None,
after=None,
until=None):
'''Get BarSet(dict[str]->list[Bar])
The parameter symbols can be either... |
def lambda_solid(name=None, inputs=None, output=None, description=None):
'''(decorator) Create a simple solid.
This shortcut allows the creation of simple solids that do not require
configuration and whose implementations do not require a context.
Lambda solids take inputs and produce a single output.... |
def solid(name=None, inputs=None, outputs=None, config_field=None, description=None):
'''(decorator) Create a solid with specified parameters.
This shortcut simplifies the core solid API by exploding arguments into kwargs of the
transform function and omitting additional parameters when they are not needed... |
def from_dict(result_dict):
'''Create a new ``MultipleResults`` object from a dictionary.
Keys of the dictionary are unpacked into result names.
Args:
result_dict (dict) - The dictionary to unpack.
Returns:
(:py:class:`MultipleResults <d... |
def create_joining_subplan(
pipeline_def, solid, join_step_key, parallel_steps, parallel_step_output
):
'''
This captures a common pattern of fanning out a single value to N steps,
where each step has similar structure. The strict requirement here is that each step
must provide an output named the p... |
def gunzipper(gzip_file):
'''gunzips /path/to/foo.gz to /path/to/raw/2019/01/01/data.json
'''
# TODO: take date as an input
path_prefix = os.path.dirname(gzip_file)
output_folder = os.path.join(path_prefix, 'raw/2019/01/01')
outfile = os.path.join(output_folder, 'data.json')
if not safe_is... |
def _check_key_value_types(obj, key_type, value_type, key_check=isinstance, value_check=isinstance):
'''Ensures argument obj is a dictionary, and enforces that the keys/values conform to the types
specified by key_type, value_type.
'''
if not isinstance(obj, dict):
raise_with_traceback(_type_mis... |
def dict_param(obj, param_name, key_type=None, value_type=None):
'''Ensures argument obj is a native Python dictionary, raises an exception if not, and otherwise
returns obj.
'''
if not isinstance(obj, dict):
raise_with_traceback(_param_type_mismatch_exception(obj, dict, param_name))
if not... |
def opt_dict_param(obj, param_name, key_type=None, value_type=None, value_class=None):
'''Ensures argument obj is either a dictionary or None; if the latter, instantiates an empty
dictionary.
'''
if obj is not None and not isinstance(obj, dict):
raise_with_traceback(_param_type_mismatch_exceptio... |
def construct_event_logger(event_record_callback):
'''
Callback receives a stream of event_records
'''
check.callable_param(event_record_callback, 'event_record_callback')
return construct_single_handler_logger(
'event-logger',
DEBUG,
StructuredLoggerHandler(
lam... |
def construct_json_event_logger(json_path):
'''Record a stream of event records to json'''
check.str_param(json_path, 'json_path')
return construct_single_handler_logger(
"json-event-record-logger",
DEBUG,
JsonEventLoggerHandler(
json_path,
lambda record: cons... |
def from_file(cls, path=None):
"""Read a config file and instantiate the RCParser.
Create new :class:`configparser.ConfigParser` for the given **path**
and instantiate the :class:`RCParser` with the ConfigParser as
:attr:`config` attribute.
If the **path** doesn't exist, raise ... |
def get_repository_config(self, repository):
"""Get config dictionary for the given repository.
If the repository section is not found in the config file,
return ``None``. If the file is invalid, raise
:exc:`configparser.Error`.
Otherwise return a dictionary with:
* `... |
def replace_parameters(context, nb, parameters):
# Uma: This is a copy-paste from papermill papermill/execute.py:104 (execute_parameters).
# Typically, papermill injects the injected-parameters cell *below* the parameters cell
# but we want to *replace* the parameters cell, which is what this function does.... |
def nonce_solid(name, n_inputs, n_outputs):
"""Creates a solid with the given number of (meaningless) inputs and outputs.
Config controls the behavior of the nonce solid."""
@solid(
name=name,
inputs=[
InputDefinition(name='input_{}'.format(i)) for i in range(n_inputs)
... |
def format_config_for_graphql(config):
'''This recursive descent thing formats a config dict for GraphQL.'''
def _format_config_subdict(config, current_indent=0):
check.dict_param(config, 'config', key_type=str)
printer = IndentingStringIoPrinter(indent_level=2, current_indent=current_indent)
... |
def get_pipeline(self, name):
'''Get a pipeline by name. Only constructs that pipeline and caches it.
Args:
name (str): Name of the pipeline to retriever
Returns:
PipelineDefinition: Instance of PipelineDefinition with that name.
'''
check.str_param(name... |
def get_all_pipelines(self):
'''Return all pipelines as a list
Returns:
List[PipelineDefinition]:
'''
pipelines = list(map(self.get_pipeline, self.pipeline_dict.keys()))
# This does uniqueness check
self._construct_solid_defs(pipelines)
return pipeli... |
def define_spark_config():
'''Spark configuration.
See the Spark documentation for reference:
https://spark.apache.org/docs/latest/submitting-applications.html
'''
master_url = Field(
String,
description='The master URL for the cluster (e.g. spark://23.195.26.187:7077)',
... |
def get_next_event(process, queue):
'''
This function polls the process until it returns a valid
item or returns PROCESS_DEAD_AND_QUEUE_EMPTY if it is in
a state where the process has terminated and the queue is empty
Warning: if the child process is in an infinite loop. This will
also infinite... |
def execute_pipeline_through_queue(
repository_info,
pipeline_name,
solid_subset,
environment_dict,
run_id,
message_queue,
reexecution_config,
step_keys_to_execute,
):
"""
Execute pipeline using message queue as a transport
"""
message_queue.put(ProcessStartedSentinel(os... |
def join(self):
'''Waits until all there are no processes enqueued.'''
while True:
with self._processes_lock:
if not self._processes and self._processing_semaphore.locked():
return True
gevent.sleep(0.1) |
def Field(
dagster_type,
default_value=FIELD_NO_DEFAULT_PROVIDED,
is_optional=INFER_OPTIONAL_COMPOSITE_FIELD,
is_secret=False,
description=None,
):
'''
The schema for configuration data that describes the type, optionality, defaults, and description.
Args:
dagster_type (DagsterT... |
def define_snowflake_config():
'''Snowflake configuration.
See the Snowflake documentation for reference:
https://docs.snowflake.net/manuals/user-guide/python-connector-api.html
'''
account = Field(
String,
description='Your Snowflake account name. For more details, see https:... |
def build(self, pipeline_def, artifacts_persisted):
'''Builds the execution plan.
'''
# Construct dependency dictionary
deps = {step.key: set() for step in self.steps}
for step in self.steps:
for step_input in step.step_inputs:
deps[step.key].add(ste... |
def build(pipeline_def, environment_config):
'''Here we build a new ExecutionPlan from a pipeline definition and the environment config.
To do this, we iterate through the pipeline's solids in topological order, and hand off the
execution steps for each solid to a companion _PlanBuilder object.... |
def _build_sub_pipeline(pipeline_def, solid_names):
'''
Build a pipeline which is a subset of another pipeline.
Only includes the solids which are in solid_names.
'''
check.inst_param(pipeline_def, 'pipeline_def', PipelineDefinition)
check.list_param(solid_names, 'solid_names', of_type=str)
... |
def solid_named(self, name):
'''Return the solid named "name". Throws if it does not exist.
Args:
name (str): Name of solid
Returns:
SolidDefinition: SolidDefinition with correct name.
'''
check.str_param(name, 'name')
if name not in self._solid_... |
def construct_publish_comands(additional_steps=None, nightly=False):
'''Get the shell commands we'll use to actually build and publish a package to PyPI.'''
publish_commands = (
['rm -rf dist']
+ (additional_steps if additional_steps else [])
+ [
'python setup.py sdist bdist_... |
def publish(nightly):
"""Publishes (uploads) all submodules to PyPI.
Appropriate credentials must be available to twine, e.g. in a ~/.pypirc file, and users must
be permissioned as maintainers on the PyPI projects. Publishing will fail if versions (git
tags and Python versions) are not in lockstep, if ... |
def release(version):
"""Tags all submodules for a new release.
Ensures that git tags, as well as the version.py files in each submodule, agree and that the
new version is strictly greater than the current version. Will fail if the new version
is not an increment (following PEP 440). Creates a new git ... |
def passthrough_context_definition(context_params):
'''Create a context definition from a pre-existing context. This can be useful
in testing contexts where you may want to create a context manually and then
pass it into a one-off PipelineDefinition
Args:
context (ExecutionC... |
def input_selector_schema(config_cls):
'''
A decorator for annotating a function that can take the selected properties
from a ``config_value`` in to an instance of a custom type.
Args:
config_cls (Selector)
'''
config_type = resolve_config_cls_arg(config_cls)
check.param_invariant(c... |
def output_selector_schema(config_cls):
'''
A decorator for a annotating a function that can take the selected properties
of a ``config_value`` and an instance of a custom type and materialize it.
Args:
config_cls (Selector):
'''
config_type = resolve_config_cls_arg(config_cls)
chec... |
def block(self, text, prefix=''):
'''Automagically wrap a block of text.'''
wrapper = TextWrapper(
width=self.line_length - len(self.current_indent_str),
initial_indent=prefix,
subsequent_indent=prefix,
break_long_words=False,
break_on_hyphens=... |
def _define_shared_fields():
'''The following fields are shared between both QueryJobConfig and LoadJobConfig.
'''
clustering_fields = Field(
List(String),
description='''Fields defining clustering for the table
(Defaults to None).
Clustering fields are immutable after tab... |
def define_bigquery_query_config():
'''See:
https://googleapis.github.io/google-cloud-python/latest/bigquery/generated/google.cloud.bigquery.job.QueryJobConfig.html
'''
sf = _define_shared_fields()
allow_large_results = Field(
Bool,
description='''Allow large query results tables (l... |
def sql_solid(name, select_statement, materialization_strategy, table_name=None, inputs=None):
'''Return a new solid that executes and materializes a SQL select statement.
Args:
name (str): The name of the new solid.
select_statement (str): The select statement to execute.
materializati... |
def download_from_s3(context):
'''Download an object from s3.
Args:
info (ExpectationExecutionInfo): Must expose a boto3 S3 client as its `s3` resource.
Returns:
str:
The path to the downloaded object.
'''
target_file = context.solid_config['target_file']
return con... |
def upload_to_s3(context, file_obj):
'''Upload a file to s3.
Args:
info (ExpectationExecutionInfo): Must expose a boto3 S3 client as its `s3` resource.
Returns:
(str, str):
The bucket and key to which the file was uploaded.
'''
bucket = context.solid_config['bucket']
... |
def user_code_error_boundary(error_cls, msg, **kwargs):
'''
Wraps the execution of user-space code in an error boundary. This places a uniform
policy around an user code invoked by the framework. This ensures that all user
errors are wrapped in the DagsterUserCodeExecutionError, and that the original st... |
def mkdir_p(newdir, mode=0o777):
"""The missing mkdir -p functionality in os."""
try:
os.makedirs(newdir, mode)
except OSError as err:
# Reraise the error unless it's about an already existing directory
if err.errno != errno.EEXIST or not os.path.isdir(newdir):
raise |
def user_code_context_manager(user_fn, error_cls, msg):
'''Wraps the output of a user provided function that may yield or return a value and
returns a generator that asserts it only yields a single value.
'''
check.callable_param(user_fn, 'user_fn')
check.subclass_param(error_cls, 'error_cls', Dagst... |
def construct_run_storage(run_config, environment_config):
'''
Construct the run storage for this pipeline. Our rules are the following:
If the RunConfig has a storage_mode provided, we use that.
Then we fallback to environment config.
If there is no config, we default to in memory storage. This ... |
def _create_context_free_log(run_config, pipeline_def):
'''In the event of pipeline initialization failure, we want to be able to log the failure
without a dependency on the ExecutionContext to initialize DagsterLog
'''
check.inst_param(run_config, 'run_config', RunConfig)
check.inst_param(pipeline_... |
def execute_pipeline_iterator(pipeline, environment_dict=None, run_config=None):
'''Returns iterator that yields :py:class:`SolidExecutionResult` for each
solid executed in the pipeline.
This is intended to allow the caller to do things between each executed
node. For the 'synchronous' API, see :py:fun... |
def execute_pipeline(pipeline, environment_dict=None, run_config=None):
'''
"Synchronous" version of :py:func:`execute_pipeline_iterator`.
Note: raise_on_error is very useful in testing contexts when not testing for error
conditions
Parameters:
pipeline (PipelineDefinition): Pipeline to run
... |
def result_for_solid(self, name):
'''Get a :py:class:`SolidExecutionResult` for a given solid name.
'''
check.str_param(name, 'name')
if not self.pipeline.has_solid(name):
raise DagsterInvariantViolationError(
'Try to get result for solid {name} in {pipeline}... |
def success(self):
'''Whether the solid execution was successful'''
any_success = False
for step_event in itertools.chain(
self.input_expectations, self.output_expectations, self.transforms
):
if step_event.event_type == DagsterEventType.STEP_FAILURE:
... |
def skipped(self):
'''Whether the solid execution was skipped'''
return all(
[
step_event.event_type == DagsterEventType.STEP_SKIPPED
for step_event in itertools.chain(
self.input_expectations, self.output_expectations, self.transforms
... |
def transformed_values(self):
'''Return dictionary of transformed results, with keys being output names.
Returns None if execution result isn't a success.
Reconstructs the pipeline context to materialize values.
'''
if self.success and self.transforms:
with self.reco... |
def transformed_value(self, output_name=DEFAULT_OUTPUT):
'''Returns transformed value either for DEFAULT_OUTPUT or for the output
given as output_name. Returns None if execution result isn't a success.
Reconstructs the pipeline context to materialize value.
'''
check.str_param(o... |
def failure_data(self):
'''Returns the failing step's data that happened during this solid's execution, if any'''
for result in itertools.chain(
self.input_expectations, self.output_expectations, self.transforms
):
if result.event_type == DagsterEventType.STEP_FAILURE:
... |
def NamedDict(name, fields, description=None, type_attributes=DEFAULT_TYPE_ATTRIBUTES):
'''
A :py:class:`Dict` with a name allowing it to be referenced by that name.
'''
check_user_facing_fields_dict(fields, 'NamedDict named "{}"'.format(name))
class _NamedDict(_ConfigComposite):
def __init... |
def Dict(fields):
'''
Schema for configuration data with string keys and typed values via :py:class:`Field` .
Args:
fields (Dict[str, Field])
'''
check_user_facing_fields_dict(fields, 'Dict')
class _Dict(_ConfigComposite):
def __init__(self):
key = 'Dict.' + str(Dic... |
def PermissiveDict(fields=None):
'''A permissive dict will permit the user to partially specify the permitted fields. Any fields
that are specified and passed in will be type checked. Other fields will be allowed, but
will be ignored by the type checker.
'''
if fields:
check_user_facing_fie... |
def Selector(fields):
'''Selectors are used when you want to be able present several different options to the user but
force them to select one. For example, it would not make much sense to allow them
to say that a single input should be sourced from a csv and a parquet file: They must choose.
Note tha... |
def NamedSelector(name, fields, description=None, type_attributes=DEFAULT_TYPE_ATTRIBUTES):
'''
A :py:class`Selector` with a name, allowing it to be referenced by that name.
Args:
name (str):
fields (Dict[str, Field])
'''
check.str_param(name, 'name')
check_user_facing_field... |
def _is_valid_dataset(config_value):
'''Datasets must be of form "project.dataset" or "dataset"
'''
return re.match(
# regex matches: project.table -- OR -- table
r'^' + RE_PROJECT + r'\.' + RE_DS_TABLE + r'$|^' + RE_DS_TABLE + r'$',
config_value,
) |
def _is_valid_table(config_value):
'''Tables must be of form "project.dataset.table" or "dataset.table"
'''
return re.match(
r'^'
+ RE_PROJECT # project
+ r'\.' # .
+ RE_DS_TABLE # dataset
+ r'\.' # .
+ RE_DS_TABLE # table
+ r'$|^' #... |
def _execute_core_transform(transform_context, inputs):
'''
Execute the user-specified transform for the solid. Wrap in an error boundary and do
all relevant logging and metrics tracking
'''
check.inst_param(transform_context, 'transform_context', SystemTransformExecutionContext)
check.dict_para... |
def dagster_type(
name=None,
description=None,
input_schema=None,
output_schema=None,
serialization_strategy=None,
storage_plugins=None,
):
'''
Decorator version of as_dagster_type. See documentation for :py:func:`as_dagster_type` .
'''
def _with_args(bare_cls):
check.ty... |
def as_dagster_type(
existing_type,
name=None,
description=None,
input_schema=None,
output_schema=None,
serialization_strategy=None,
storage_plugins=None,
):
'''
Takes a python cls and creates a type for it in the Dagster domain.
Args:
existing_type (cls)
The... |
def resource(config_field=None, description=None):
'''A decorator for creating a resource. The decorated function will be used as the
resource_fn in a ResourceDefinition.
'''
# This case is for when decorator is used bare, without arguments.
# E.g. @resource versus @resource()
if callable(conf... |
def run_spark_subprocess(cmd, logger):
"""See https://bit.ly/2OpksJC for source of the subprocess stdout/stderr capture pattern in this
function.
"""
# Spark sometimes logs in log4j format. In those cases, we detect and parse.
# Example log line from Spark that this is intended to match:
# 2019... |
def parse_spark_config(spark_conf):
'''For each key-value pair in spark conf, we need to pass to CLI in format:
--conf "key=value"
'''
spark_conf_list = flatten_dict(spark_conf)
return list(
itertools.chain.from_iterable([('--conf', '{}={}'.format(*c)) for c in spark_conf_list])
) |
def SystemNamedDict(name, fields, description=None):
'''A SystemNamedDict object is simply a NamedDict intended for internal (dagster) use.
'''
return NamedDict(name, fields, description, ConfigTypeAttributes(is_system_config=True)) |
def EventV2_create(
self,
summary,
source,
severity,
event_action='trigger',
dedup_key=None,
timestamp=None,
component=None,
group=None,
event_class=None,
custom_details=None,
):
'''Events API v2 enables you to add Pager... |
def coalesce_execution_steps(execution_plan):
'''Groups execution steps by solid, in topological order of the solids.'''
solid_order = _coalesce_solid_order(execution_plan)
steps = defaultdict(list)
for solid_name, solid_steps in itertools.groupby(
execution_plan.topological_steps(), lambda x... |
def get_connection_params(self):
"""
Default method to acquire database connection parameters.
Sets connection parameters to match settings.py, and sets
default values to blank fields.
"""
valid_settings = {
'NAME': 'name',
'HOST': 'host',
... |
def get_new_connection(self, connection_params):
"""
Receives a dictionary connection_params to setup
a connection to the database.
Dictionary correct setup is made through the
get_connection_params method.
TODO: This needs to be made more generic to accept
othe... |
def create_cursor(self, name=None):
"""
Returns an active connection cursor to the database.
"""
return Cursor(self.client_connection, self.connection, self.djongo_connection) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.