repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_documentation_string stringlengths 1 47.2k | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|
openstack/hacking | hacking/checks/comments.py | hacking_has_only_comments | def hacking_has_only_comments(physical_line, filename, lines, line_number):
"""Check for empty files with only comments
H104 empty file with only comments
"""
if line_number == 1 and all(map(EMPTY_LINE_RE.match, lines)):
return (0, "H104: File contains nothing but comments") | python | def hacking_has_only_comments(physical_line, filename, lines, line_number):
"""Check for empty files with only comments
H104 empty file with only comments
"""
if line_number == 1 and all(map(EMPTY_LINE_RE.match, lines)):
return (0, "H104: File contains nothing but comments") | Check for empty files with only comments
H104 empty file with only comments | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/comments.py#L100-L106 |
openstack/hacking | hacking/checks/comments.py | _project_is_apache | def _project_is_apache():
"""Determine if a project is Apache.
Look for a key string in a set of possible license files to figure out
if a project looks to be Apache. This is used as a precondition for
enforcing license headers.
"""
global _is_apache_cache
if _is_apache_cache is not None:
... | python | def _project_is_apache():
"""Determine if a project is Apache.
Look for a key string in a set of possible license files to figure out
if a project looks to be Apache. This is used as a precondition for
enforcing license headers.
"""
global _is_apache_cache
if _is_apache_cache is not None:
... | Determine if a project is Apache.
Look for a key string in a set of possible license files to figure out
if a project looks to be Apache. This is used as a precondition for
enforcing license headers. | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/comments.py#L112-L134 |
openstack/hacking | hacking/checks/comments.py | _check_for_exact_apache | def _check_for_exact_apache(start, lines):
"""Check for the Apache 2.0 license header.
We strip all the newlines and extra spaces so this license string
should work regardless of indentation in the file.
"""
APACHE2 = """
Licensed under the Apache License, Version 2.0 (the "License"); you may
not u... | python | def _check_for_exact_apache(start, lines):
"""Check for the Apache 2.0 license header.
We strip all the newlines and extra spaces so this license string
should work regardless of indentation in the file.
"""
APACHE2 = """
Licensed under the Apache License, Version 2.0 (the "License"); you may
not u... | Check for the Apache 2.0 license header.
We strip all the newlines and extra spaces so this license string
should work regardless of indentation in the file. | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/comments.py#L137-L170 |
openstack/hacking | hacking/checks/comments.py | hacking_no_author_tags | def hacking_no_author_tags(physical_line):
"""Check that no author tags are used.
H105 don't use author tags
"""
for regex in AUTHOR_TAG_RE:
if regex.match(physical_line):
physical_line = physical_line.lower()
pos = physical_line.find('moduleauthor')
if pos <... | python | def hacking_no_author_tags(physical_line):
"""Check that no author tags are used.
H105 don't use author tags
"""
for regex in AUTHOR_TAG_RE:
if regex.match(physical_line):
physical_line = physical_line.lower()
pos = physical_line.find('moduleauthor')
if pos <... | Check that no author tags are used.
H105 don't use author tags | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/comments.py#L174-L185 |
openstack/hacking | hacking/checks/python23.py | hacking_python3x_except_compatible | def hacking_python3x_except_compatible(logical_line, noqa):
r"""Check for except statements to be Python 3.x compatible
As of Python 3.x, the construct 'except x,y:' has been removed.
Use 'except x as y:' instead.
Okay: try:\n pass\nexcept Exception:\n pass
Okay: try:\n pass\nexcept (Exc... | python | def hacking_python3x_except_compatible(logical_line, noqa):
r"""Check for except statements to be Python 3.x compatible
As of Python 3.x, the construct 'except x,y:' has been removed.
Use 'except x as y:' instead.
Okay: try:\n pass\nexcept Exception:\n pass
Okay: try:\n pass\nexcept (Exc... | r"""Check for except statements to be Python 3.x compatible
As of Python 3.x, the construct 'except x,y:' has been removed.
Use 'except x as y:' instead.
Okay: try:\n pass\nexcept Exception:\n pass
Okay: try:\n pass\nexcept (Exception, AttributeError):\n pass
H231: try:\n pass\nexc... | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/python23.py#L24-L46 |
openstack/hacking | hacking/checks/python23.py | hacking_python3x_octal_literals | def hacking_python3x_octal_literals(logical_line, tokens, noqa):
r"""Check for octal literals in Python 3.x compatible form.
As of Python 3.x, the construct "0755" has been removed.
Use "0o755" instead".
Okay: f(0o755)
Okay: 'f(0755)'
Okay: f(755)
Okay: f(0)
Okay: f(000)
Okay: MiB... | python | def hacking_python3x_octal_literals(logical_line, tokens, noqa):
r"""Check for octal literals in Python 3.x compatible form.
As of Python 3.x, the construct "0755" has been removed.
Use "0o755" instead".
Okay: f(0o755)
Okay: 'f(0755)'
Okay: f(755)
Okay: f(0)
Okay: f(000)
Okay: MiB... | r"""Check for octal literals in Python 3.x compatible form.
As of Python 3.x, the construct "0755" has been removed.
Use "0o755" instead".
Okay: f(0o755)
Okay: 'f(0755)'
Okay: f(755)
Okay: f(0)
Okay: f(000)
Okay: MiB = 1.0415
H232: f(0755)
Okay: f(0755) # noqa | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/python23.py#L51-L76 |
openstack/hacking | hacking/checks/python23.py | hacking_python3x_print_function | def hacking_python3x_print_function(logical_line, noqa):
r"""Check that all print occurrences look like print functions.
Check that all occurrences of print look like functions, not
print operator. As of Python 3.x, the print operator has
been removed.
Okay: print(msg)
Okay: print (msg)
O... | python | def hacking_python3x_print_function(logical_line, noqa):
r"""Check that all print occurrences look like print functions.
Check that all occurrences of print look like functions, not
print operator. As of Python 3.x, the print operator has
been removed.
Okay: print(msg)
Okay: print (msg)
O... | r"""Check that all print occurrences look like print functions.
Check that all occurrences of print look like functions, not
print operator. As of Python 3.x, the print operator has
been removed.
Okay: print(msg)
Okay: print (msg)
Okay: print msg # noqa
Okay: print()
H233: print msg
... | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/python23.py#L81-L102 |
openstack/hacking | hacking/checks/python23.py | hacking_no_assert_equals | def hacking_no_assert_equals(logical_line, tokens, noqa):
r"""assert(Not)Equals() is deprecated, use assert(Not)Equal instead.
Okay: self.assertEqual(0, 0)
Okay: self.assertNotEqual(0, 1)
H234: self.assertEquals(0, 0)
H234: self.assertNotEquals(0, 1)
Okay: self.assertEquals(0, 0) # noqa
Ok... | python | def hacking_no_assert_equals(logical_line, tokens, noqa):
r"""assert(Not)Equals() is deprecated, use assert(Not)Equal instead.
Okay: self.assertEqual(0, 0)
Okay: self.assertNotEqual(0, 1)
H234: self.assertEquals(0, 0)
H234: self.assertNotEquals(0, 1)
Okay: self.assertEquals(0, 0) # noqa
Ok... | r"""assert(Not)Equals() is deprecated, use assert(Not)Equal instead.
Okay: self.assertEqual(0, 0)
Okay: self.assertNotEqual(0, 1)
H234: self.assertEquals(0, 0)
H234: self.assertNotEquals(0, 1)
Okay: self.assertEquals(0, 0) # noqa
Okay: self.assertNotEquals(0, 1) # noqa | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/python23.py#L106-L124 |
openstack/hacking | hacking/checks/python23.py | hacking_python3x_metaclass | def hacking_python3x_metaclass(logical_line, noqa):
r"""Check for metaclass to be Python 3.x compatible.
Okay: @six.add_metaclass(Meta)\nclass Foo(object):\n pass
Okay: @six.with_metaclass(Meta)\nclass Foo(object):\n pass
Okay: class Foo(object):\n '''docstring\n\n __metaclass__ = Meta\n'''... | python | def hacking_python3x_metaclass(logical_line, noqa):
r"""Check for metaclass to be Python 3.x compatible.
Okay: @six.add_metaclass(Meta)\nclass Foo(object):\n pass
Okay: @six.with_metaclass(Meta)\nclass Foo(object):\n pass
Okay: class Foo(object):\n '''docstring\n\n __metaclass__ = Meta\n'''... | r"""Check for metaclass to be Python 3.x compatible.
Okay: @six.add_metaclass(Meta)\nclass Foo(object):\n pass
Okay: @six.with_metaclass(Meta)\nclass Foo(object):\n pass
Okay: class Foo(object):\n '''docstring\n\n __metaclass__ = Meta\n'''
H236: class Foo(object):\n __metaclass__ = Meta
... | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/python23.py#L146-L165 |
openstack/hacking | hacking/checks/python23.py | hacking_no_removed_module | def hacking_no_removed_module(logical_line, noqa):
r"""Check for removed modules in Python 3.
Examples:
Okay: from os import path
Okay: from os import path as p
Okay: from os import (path as p)
Okay: import os.path
H237: import thread
Okay: import thread # noqa
H237: import command... | python | def hacking_no_removed_module(logical_line, noqa):
r"""Check for removed modules in Python 3.
Examples:
Okay: from os import path
Okay: from os import path as p
Okay: from os import (path as p)
Okay: import os.path
H237: import thread
Okay: import thread # noqa
H237: import command... | r"""Check for removed modules in Python 3.
Examples:
Okay: from os import path
Okay: from os import path as p
Okay: from os import (path as p)
Okay: import os.path
H237: import thread
Okay: import thread # noqa
H237: import commands
H237: import md5 as std_md5 | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/python23.py#L185-L205 |
openstack/hacking | hacking/checks/python23.py | hacking_no_old_style_class | def hacking_no_old_style_class(logical_line, noqa):
r"""Check for old style classes.
Examples:
Okay: class Foo(object):\n pass
Okay: class Foo(Bar, Baz):\n pass
Okay: class Foo(object, Baz):\n pass
Okay: class Foo(somefunc()):\n pass
H238: class Bar:\n pass
H238: class Ba... | python | def hacking_no_old_style_class(logical_line, noqa):
r"""Check for old style classes.
Examples:
Okay: class Foo(object):\n pass
Okay: class Foo(Bar, Baz):\n pass
Okay: class Foo(object, Baz):\n pass
Okay: class Foo(somefunc()):\n pass
H238: class Bar:\n pass
H238: class Ba... | r"""Check for old style classes.
Examples:
Okay: class Foo(object):\n pass
Okay: class Foo(Bar, Baz):\n pass
Okay: class Foo(object, Baz):\n pass
Okay: class Foo(somefunc()):\n pass
H238: class Bar:\n pass
H238: class Bar():\n pass | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/python23.py#L212-L228 |
openstack/hacking | hacking/checks/vim_check.py | no_vim_headers | def no_vim_headers(physical_line, line_number, lines):
r"""Check for vim editor configuration in source files.
By default vim modelines can only appear in the first or
last 5 lines of a source file.
Examples:
H106: # vim: set tabstop=4 shiftwidth=4\n#\n#\n#\n#\n#
H106: # Lic\n# vim: set tabsto... | python | def no_vim_headers(physical_line, line_number, lines):
r"""Check for vim editor configuration in source files.
By default vim modelines can only appear in the first or
last 5 lines of a source file.
Examples:
H106: # vim: set tabstop=4 shiftwidth=4\n#\n#\n#\n#\n#
H106: # Lic\n# vim: set tabsto... | r"""Check for vim editor configuration in source files.
By default vim modelines can only appear in the first or
last 5 lines of a source file.
Examples:
H106: # vim: set tabstop=4 shiftwidth=4\n#\n#\n#\n#\n#
H106: # Lic\n# vim: set tabstop=4 shiftwidth=4\n#\n#\n#\n#\n#
H106: # Lic\n#\n#\n#\n#... | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/vim_check.py#L23-L39 |
openstack/hacking | hacking/checks/imports.py | hacking_import_rules | def hacking_import_rules(logical_line, filename, noqa):
r"""Check for imports.
OpenStack HACKING guide recommends one import per line:
Do not import more than one module per line
Examples:
Okay: from nova.compute import api
H301: from nova.compute import api, utils
Do not use wildcard im... | python | def hacking_import_rules(logical_line, filename, noqa):
r"""Check for imports.
OpenStack HACKING guide recommends one import per line:
Do not import more than one module per line
Examples:
Okay: from nova.compute import api
H301: from nova.compute import api, utils
Do not use wildcard im... | r"""Check for imports.
OpenStack HACKING guide recommends one import per line:
Do not import more than one module per line
Examples:
Okay: from nova.compute import api
H301: from nova.compute import api, utils
Do not use wildcard import
Do not make relative imports
Examples:
Ok... | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/imports.py#L21-L76 |
openstack/hacking | hacking/checks/imports.py | hacking_import_alphabetical | def hacking_import_alphabetical(logical_line, blank_before, previous_logical,
indent_level, previous_indent_level):
r"""Check for imports in alphabetical order.
OpenStack HACKING guide recommendation for imports:
imports in human alphabetical order
Okay: import os\nimpo... | python | def hacking_import_alphabetical(logical_line, blank_before, previous_logical,
indent_level, previous_indent_level):
r"""Check for imports in alphabetical order.
OpenStack HACKING guide recommendation for imports:
imports in human alphabetical order
Okay: import os\nimpo... | r"""Check for imports in alphabetical order.
OpenStack HACKING guide recommendation for imports:
imports in human alphabetical order
Okay: import os\nimport sys\n\nimport nova\nfrom nova import test
Okay: import os\nimport sys
H306: import sys\nimport os
Okay: import sys\n\n# foo\nimport six | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/imports.py#L80-L104 |
openstack/hacking | hacking/core.py | is_import_exception | def is_import_exception(mod):
"""Check module name to see if import has been whitelisted.
Import based rules should not run on any whitelisted module
"""
return (mod in IMPORT_EXCEPTIONS or
any(mod.startswith(m + '.') for m in IMPORT_EXCEPTIONS)) | python | def is_import_exception(mod):
"""Check module name to see if import has been whitelisted.
Import based rules should not run on any whitelisted module
"""
return (mod in IMPORT_EXCEPTIONS or
any(mod.startswith(m + '.') for m in IMPORT_EXCEPTIONS)) | Check module name to see if import has been whitelisted.
Import based rules should not run on any whitelisted module | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/core.py#L91-L97 |
openstack/hacking | hacking/core.py | GlobalCheck.run | def run(self):
"""Make run a no-op if run() has been called before.
Store in a global registry the list of checks we've run. If we have
run that one before, just skip doing anything the subsequent times.
This way, since pycodestyle is file/line based, we don't wind
up re-running... | python | def run(self):
"""Make run a no-op if run() has been called before.
Store in a global registry the list of checks we've run. If we have
run that one before, just skip doing anything the subsequent times.
This way, since pycodestyle is file/line based, we don't wind
up re-running... | Make run a no-op if run() has been called before.
Store in a global registry the list of checks we've run. If we have
run that one before, just skip doing anything the subsequent times.
This way, since pycodestyle is file/line based, we don't wind
up re-running a check on a git commit m... | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/core.py#L125-L137 |
openstack/hacking | hacking/checks/dictlist.py | hacking_no_locals | def hacking_no_locals(logical_line, tokens, noqa):
"""Do not use locals() or self.__dict__ for string formatting.
Okay: 'locals()'
Okay: 'locals'
Okay: locals()
Okay: print(locals())
H501: print("%(something)" % locals())
H501: LOG.info(_("%(something)") % self.__dict__)
Okay: print("%(... | python | def hacking_no_locals(logical_line, tokens, noqa):
"""Do not use locals() or self.__dict__ for string formatting.
Okay: 'locals()'
Okay: 'locals'
Okay: locals()
Okay: print(locals())
H501: print("%(something)" % locals())
H501: LOG.info(_("%(something)") % self.__dict__)
Okay: print("%(... | Do not use locals() or self.__dict__ for string formatting.
Okay: 'locals()'
Okay: 'locals'
Okay: locals()
Okay: print(locals())
H501: print("%(something)" % locals())
H501: LOG.info(_("%(something)") % self.__dict__)
Okay: print("%(something)" % locals()) # noqa | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/dictlist.py#L25-L46 |
openstack/hacking | hacking/checks/docstrings.py | hacking_docstring_start_space | def hacking_docstring_start_space(physical_line, previous_logical, tokens):
r"""Check for docstring not starting with space.
OpenStack HACKING guide recommendation for docstring:
Docstring should not start with space
Okay: def foo():\n '''This is good.'''
Okay: def foo():\n r'''This is good.... | python | def hacking_docstring_start_space(physical_line, previous_logical, tokens):
r"""Check for docstring not starting with space.
OpenStack HACKING guide recommendation for docstring:
Docstring should not start with space
Okay: def foo():\n '''This is good.'''
Okay: def foo():\n r'''This is good.... | r"""Check for docstring not starting with space.
OpenStack HACKING guide recommendation for docstring:
Docstring should not start with space
Okay: def foo():\n '''This is good.'''
Okay: def foo():\n r'''This is good.'''
Okay: def foo():\n a = ''' This is not a docstring.'''
Okay: def ... | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/docstrings.py#L22-L42 |
openstack/hacking | hacking/checks/docstrings.py | hacking_docstring_multiline_end | def hacking_docstring_multiline_end(physical_line, previous_logical, tokens):
r"""Check multi line docstring end.
OpenStack HACKING guide recommendation for docstring:
Docstring should end on a new line
Okay: '''foobar\nfoo\nbar\n'''
Okay: def foo():\n '''foobar\n\nfoo\nbar\n'''
Okay: class... | python | def hacking_docstring_multiline_end(physical_line, previous_logical, tokens):
r"""Check multi line docstring end.
OpenStack HACKING guide recommendation for docstring:
Docstring should end on a new line
Okay: '''foobar\nfoo\nbar\n'''
Okay: def foo():\n '''foobar\n\nfoo\nbar\n'''
Okay: class... | r"""Check multi line docstring end.
OpenStack HACKING guide recommendation for docstring:
Docstring should end on a new line
Okay: '''foobar\nfoo\nbar\n'''
Okay: def foo():\n '''foobar\n\nfoo\nbar\n'''
Okay: class Foo(object):\n '''foobar\n\nfoo\nbar\n'''
Okay: def foo():\n a = '''not... | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/docstrings.py#L46-L73 |
openstack/hacking | hacking/checks/docstrings.py | hacking_docstring_multiline_start | def hacking_docstring_multiline_start(physical_line, previous_logical, tokens):
r"""Check multi line docstring starts immediately with summary.
OpenStack HACKING guide recommendation for docstring:
Docstring should start with a one-line summary, less than 80 characters.
Okay: '''foobar\n\nfoo\nbar\n''... | python | def hacking_docstring_multiline_start(physical_line, previous_logical, tokens):
r"""Check multi line docstring starts immediately with summary.
OpenStack HACKING guide recommendation for docstring:
Docstring should start with a one-line summary, less than 80 characters.
Okay: '''foobar\n\nfoo\nbar\n''... | r"""Check multi line docstring starts immediately with summary.
OpenStack HACKING guide recommendation for docstring:
Docstring should start with a one-line summary, less than 80 characters.
Okay: '''foobar\n\nfoo\nbar\n'''
Okay: def foo():\n a = '''\nnot\na docstring\n'''
H404: def foo():\n ... | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/docstrings.py#L77-L99 |
openstack/hacking | hacking/checks/docstrings.py | hacking_docstring_summary | def hacking_docstring_summary(physical_line, previous_logical, tokens):
r"""Check multi line docstring summary is separated with empty line.
OpenStack HACKING guide recommendation for docstring:
Docstring should start with a one-line summary, less than 80 characters.
Okay: def foo():\n a = '''\nnot... | python | def hacking_docstring_summary(physical_line, previous_logical, tokens):
r"""Check multi line docstring summary is separated with empty line.
OpenStack HACKING guide recommendation for docstring:
Docstring should start with a one-line summary, less than 80 characters.
Okay: def foo():\n a = '''\nnot... | r"""Check multi line docstring summary is separated with empty line.
OpenStack HACKING guide recommendation for docstring:
Docstring should start with a one-line summary, less than 80 characters.
Okay: def foo():\n a = '''\nnot\na docstring\n'''
Okay: '''foobar\n\nfoo\nbar\n'''
H405: def foo():... | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/docstrings.py#L103-L125 |
openstack/hacking | hacking/checks/docstrings.py | is_docstring | def is_docstring(tokens, previous_logical):
"""Return found docstring
'A docstring is a string literal that occurs as the first statement in a
module, function, class,'
http://www.python.org/dev/peps/pep-0257/#what-is-a-docstring
"""
for token_type, text, start, _, _ in tokens:
if token... | python | def is_docstring(tokens, previous_logical):
"""Return found docstring
'A docstring is a string literal that occurs as the first statement in a
module, function, class,'
http://www.python.org/dev/peps/pep-0257/#what-is-a-docstring
"""
for token_type, text, start, _, _ in tokens:
if token... | Return found docstring
'A docstring is a string literal that occurs as the first statement in a
module, function, class,'
http://www.python.org/dev/peps/pep-0257/#what-is-a-docstring | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/docstrings.py#L128-L147 |
openstack/hacking | hacking/checks/docstrings.py | _find_first_of | def _find_first_of(line, substrings):
"""Find earliest occurrence of one of substrings in line.
Returns pair of index and found substring, or (-1, None)
if no occurrences of any of substrings were found in line.
"""
starts = ((line.find(i), i) for i in substrings)
found = [(i, sub) for i, sub i... | python | def _find_first_of(line, substrings):
"""Find earliest occurrence of one of substrings in line.
Returns pair of index and found substring, or (-1, None)
if no occurrences of any of substrings were found in line.
"""
starts = ((line.find(i), i) for i in substrings)
found = [(i, sub) for i, sub i... | Find earliest occurrence of one of substrings in line.
Returns pair of index and found substring, or (-1, None)
if no occurrences of any of substrings were found in line. | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/docstrings.py#L150-L161 |
openstack/hacking | hacking/checks/localization.py | check_i18n | def check_i18n():
"""Generator that checks token stream for localization errors.
Expects tokens to be ``send``ed one by one.
Raises LocalizationError if some error is found.
"""
while True:
try:
token_type, text, _, _, line = yield
except GeneratorExit:
retur... | python | def check_i18n():
"""Generator that checks token stream for localization errors.
Expects tokens to be ``send``ed one by one.
Raises LocalizationError if some error is found.
"""
while True:
try:
token_type, text, _, _, line = yield
except GeneratorExit:
retur... | Generator that checks token stream for localization errors.
Expects tokens to be ``send``ed one by one.
Raises LocalizationError if some error is found. | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/localization.py#L33-L95 |
openstack/hacking | hacking/checks/localization.py | hacking_localization_strings | def hacking_localization_strings(logical_line, tokens, noqa):
r"""Check localization in line.
Okay: _("This is fine")
Okay: _LI("This is fine")
Okay: _LW("This is fine")
Okay: _LE("This is fine")
Okay: _LC("This is fine")
Okay: _("This is also fine %s")
Okay: _("So is this %s, %(foo)s")... | python | def hacking_localization_strings(logical_line, tokens, noqa):
r"""Check localization in line.
Okay: _("This is fine")
Okay: _LI("This is fine")
Okay: _LW("This is fine")
Okay: _LE("This is fine")
Okay: _LC("This is fine")
Okay: _("This is also fine %s")
Okay: _("So is this %s, %(foo)s")... | r"""Check localization in line.
Okay: _("This is fine")
Okay: _LI("This is fine")
Okay: _LW("This is fine")
Okay: _LE("This is fine")
Okay: _LC("This is fine")
Okay: _("This is also fine %s")
Okay: _("So is this %s, %(foo)s") % {foo: 'foo'}
H701: _('')
Okay: def _(msg):\n pass
... | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/localization.py#L99-L139 |
openstack/hacking | hacking/checks/except_checks.py | is_none | def is_none(node):
'''Check whether an AST node corresponds to None.
In Python 2 None uses the same ast.Name class that variables etc. use,
but in Python 3 there is a new ast.NameConstant class.
'''
if PY2:
return isinstance(node, ast.Name) and node.id == 'None'
return isinstance(node, ... | python | def is_none(node):
'''Check whether an AST node corresponds to None.
In Python 2 None uses the same ast.Name class that variables etc. use,
but in Python 3 there is a new ast.NameConstant class.
'''
if PY2:
return isinstance(node, ast.Name) and node.id == 'None'
return isinstance(node, ... | Check whether an AST node corresponds to None.
In Python 2 None uses the same ast.Name class that variables etc. use,
but in Python 3 there is a new ast.NameConstant class. | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/except_checks.py#L63-L71 |
openstack/hacking | hacking/checks/except_checks.py | hacking_assert_is_none | def hacking_assert_is_none(logical_line, noqa):
"""Use assertIs(Not)None to check for None in assertions.
Okay: self.assertEqual('foo', 'bar')
Okay: self.assertNotEqual('foo', {}.get('bar', None))
Okay: self.assertIs('foo', 'bar')
Okay: self.assertIsNot('foo', 'bar', None)
Okay: foo(self.assert... | python | def hacking_assert_is_none(logical_line, noqa):
"""Use assertIs(Not)None to check for None in assertions.
Okay: self.assertEqual('foo', 'bar')
Okay: self.assertNotEqual('foo', {}.get('bar', None))
Okay: self.assertIs('foo', 'bar')
Okay: self.assertIsNot('foo', 'bar', None)
Okay: foo(self.assert... | Use assertIs(Not)None to check for None in assertions.
Okay: self.assertEqual('foo', 'bar')
Okay: self.assertNotEqual('foo', {}.get('bar', None))
Okay: self.assertIs('foo', 'bar')
Okay: self.assertIsNot('foo', 'bar', None)
Okay: foo(self.assertIsNot('foo', 'bar'))
H203: self.assertEqual(None, '... | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/except_checks.py#L107-L135 |
openstack/hacking | hacking/checks/except_checks.py | hacking_assert_equal | def hacking_assert_equal(logical_line, noqa):
r"""Check that self.assertEqual and self.assertNotEqual are used.
Okay: self.assertEqual(x, y)
Okay: self.assertNotEqual(x, y)
H204: self.assertTrue(x == y)
H204: self.assertTrue(x != y)
H204: self.assertFalse(x == y)
H204: self.assertFalse(x !=... | python | def hacking_assert_equal(logical_line, noqa):
r"""Check that self.assertEqual and self.assertNotEqual are used.
Okay: self.assertEqual(x, y)
Okay: self.assertNotEqual(x, y)
H204: self.assertTrue(x == y)
H204: self.assertTrue(x != y)
H204: self.assertFalse(x == y)
H204: self.assertFalse(x !=... | r"""Check that self.assertEqual and self.assertNotEqual are used.
Okay: self.assertEqual(x, y)
Okay: self.assertNotEqual(x, y)
H204: self.assertTrue(x == y)
H204: self.assertTrue(x != y)
H204: self.assertFalse(x == y)
H204: self.assertFalse(x != y) | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/except_checks.py#L169-L193 |
openstack/hacking | hacking/checks/except_checks.py | hacking_assert_greater_less | def hacking_assert_greater_less(logical_line, noqa):
r"""Check that self.assert{Greater,Less}[Equal] are used.
Okay: self.assertGreater(x, y)
Okay: self.assertGreaterEqual(x, y)
Okay: self.assertLess(x, y)
Okay: self.assertLessEqual(x, y)
H205: self.assertTrue(x > y)
H205: self.assertTrue(x... | python | def hacking_assert_greater_less(logical_line, noqa):
r"""Check that self.assert{Greater,Less}[Equal] are used.
Okay: self.assertGreater(x, y)
Okay: self.assertGreaterEqual(x, y)
Okay: self.assertLess(x, y)
Okay: self.assertLessEqual(x, y)
H205: self.assertTrue(x > y)
H205: self.assertTrue(x... | r"""Check that self.assert{Greater,Less}[Equal] are used.
Okay: self.assertGreater(x, y)
Okay: self.assertGreaterEqual(x, y)
Okay: self.assertLess(x, y)
Okay: self.assertLessEqual(x, y)
H205: self.assertTrue(x > y)
H205: self.assertTrue(x >= y)
H205: self.assertTrue(x < y)
H205: self.as... | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/except_checks.py#L198-L224 |
openstack/hacking | hacking/checks/other.py | hacking_no_cr | def hacking_no_cr(physical_line):
r"""Check that we only use newlines not carriage returns.
Okay: import os\nimport sys
# pep8 doesn't yet replace \r in strings, will work on an
# upstream fix
H903 import os\r\nimport sys
"""
pos = physical_line.find('\r')
if pos != -1 and pos == (len(p... | python | def hacking_no_cr(physical_line):
r"""Check that we only use newlines not carriage returns.
Okay: import os\nimport sys
# pep8 doesn't yet replace \r in strings, will work on an
# upstream fix
H903 import os\r\nimport sys
"""
pos = physical_line.find('\r')
if pos != -1 and pos == (len(p... | r"""Check that we only use newlines not carriage returns.
Okay: import os\nimport sys
# pep8 doesn't yet replace \r in strings, will work on an
# upstream fix
H903 import os\r\nimport sys | https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/checks/other.py#L24-L34 |
datadotworld/data.world-py | datadotworld/client/_swagger/apis/download_api.py | DownloadApi.download_dataset | def download_dataset(self, owner, id, **kwargs):
"""
Download dataset
This endpoint will return a .zip containing all files within the dataset as originally uploaded. If you are interested retrieving clean data extracted from those files by data.world, check out `GET:/sql` and `GET:/sparql`.
... | python | def download_dataset(self, owner, id, **kwargs):
"""
Download dataset
This endpoint will return a .zip containing all files within the dataset as originally uploaded. If you are interested retrieving clean data extracted from those files by data.world, check out `GET:/sql` and `GET:/sparql`.
... | Download dataset
This endpoint will return a .zip containing all files within the dataset as originally uploaded. If you are interested retrieving clean data extracted from those files by data.world, check out `GET:/sql` and `GET:/sparql`.
This method makes a synchronous HTTP request by default. To ma... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/apis/download_api.py#L43-L68 |
datadotworld/data.world-py | datadotworld/client/_swagger/apis/download_api.py | DownloadApi.download_file | def download_file(self, owner, id, file, **kwargs):
"""
Download file
This endpoint will return a file within the dataset as originally uploaded. If you are interested retrieving clean data extracted from those files by data.world, check out `GET:/sql` and `GET:/sparql`.
This method ma... | python | def download_file(self, owner, id, file, **kwargs):
"""
Download file
This endpoint will return a file within the dataset as originally uploaded. If you are interested retrieving clean data extracted from those files by data.world, check out `GET:/sql` and `GET:/sparql`.
This method ma... | Download file
This endpoint will return a file within the dataset as originally uploaded. If you are interested retrieving clean data extracted from those files by data.world, check out `GET:/sql` and `GET:/sparql`.
This method makes a synchronous HTTP request by default. To make an
asynchrono... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/apis/download_api.py#L156-L182 |
datadotworld/data.world-py | datadotworld/client/_swagger/models/paginated_dataset_results.py | PaginatedDatasetResults.count | def count(self, count):
"""
Sets the count of this PaginatedDatasetResults.
:param count: The count of this PaginatedDatasetResults.
:type: int
"""
if count is None:
raise ValueError("Invalid value for `count`, must not be `None`")
if count is not Non... | python | def count(self, count):
"""
Sets the count of this PaginatedDatasetResults.
:param count: The count of this PaginatedDatasetResults.
:type: int
"""
if count is None:
raise ValueError("Invalid value for `count`, must not be `None`")
if count is not Non... | Sets the count of this PaginatedDatasetResults.
:param count: The count of this PaginatedDatasetResults.
:type: int | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/models/paginated_dataset_results.py#L70-L82 |
datadotworld/data.world-py | datadotworld/client/_swagger/models/web_authorization.py | WebAuthorization.type | def type(self, type):
"""
Sets the type of this WebAuthorization.
The authorization scheme. Usually this is \"Bearer\" but it could be other values like \"Token\" or \"Basic\" etc.
:param type: The type of this WebAuthorization.
:type: str
"""
if type is None:
... | python | def type(self, type):
"""
Sets the type of this WebAuthorization.
The authorization scheme. Usually this is \"Bearer\" but it could be other values like \"Token\" or \"Basic\" etc.
:param type: The type of this WebAuthorization.
:type: str
"""
if type is None:
... | Sets the type of this WebAuthorization.
The authorization scheme. Usually this is \"Bearer\" but it could be other values like \"Token\" or \"Basic\" etc.
:param type: The type of this WebAuthorization.
:type: str | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/models/web_authorization.py#L67-L82 |
datadotworld/data.world-py | datadotworld/client/_swagger/models/web_authorization.py | WebAuthorization.credentials | def credentials(self, credentials):
"""
Sets the credentials of this WebAuthorization.
The confidential portion of the `Authorization` header that follows the `type` field. This field is write-only. It is omitted by read operations. If authorization is required, the `credentials` value must be... | python | def credentials(self, credentials):
"""
Sets the credentials of this WebAuthorization.
The confidential portion of the `Authorization` header that follows the `type` field. This field is write-only. It is omitted by read operations. If authorization is required, the `credentials` value must be... | Sets the credentials of this WebAuthorization.
The confidential portion of the `Authorization` header that follows the `type` field. This field is write-only. It is omitted by read operations. If authorization is required, the `credentials` value must be provided whenever a File Source is created or modified.... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/models/web_authorization.py#L96-L111 |
datadotworld/data.world-py | datadotworld/models/dataset.py | LocalDataset.describe | def describe(self, resource=None):
"""Describe dataset or resource within dataset
:param resource: The name of a specific resource (i.e. file or table)
contained in the dataset. If ``resource`` is None, this method
will describe the dataset itself. (Default value = None)
... | python | def describe(self, resource=None):
"""Describe dataset or resource within dataset
:param resource: The name of a specific resource (i.e. file or table)
contained in the dataset. If ``resource`` is None, this method
will describe the dataset itself. (Default value = None)
... | Describe dataset or resource within dataset
:param resource: The name of a specific resource (i.e. file or table)
contained in the dataset. If ``resource`` is None, this method
will describe the dataset itself. (Default value = None)
:type resource: str, optional
:return... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/models/dataset.py#L98-L116 |
datadotworld/data.world-py | datadotworld/models/dataset.py | LocalDataset._load_raw_data | def _load_raw_data(self, resource_name):
"""Extract raw data from resource
:param resource_name:
"""
# Instantiating the resource again as a simple `Resource` ensures that
# ``data`` will be returned as bytes.
upcast_resource = datapackage.Resource(
self.__re... | python | def _load_raw_data(self, resource_name):
"""Extract raw data from resource
:param resource_name:
"""
# Instantiating the resource again as a simple `Resource` ensures that
# ``data`` will be returned as bytes.
upcast_resource = datapackage.Resource(
self.__re... | Extract raw data from resource
:param resource_name: | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/models/dataset.py#L119-L129 |
datadotworld/data.world-py | datadotworld/models/dataset.py | LocalDataset._load_table | def _load_table(self, resource_name):
"""Build table structure from resource data
:param resource_name:
"""
tabular_resource = self.__tabular_resources[resource_name]
try:
# Sorting fields in the same order as they appear in the schema
# is necessary for... | python | def _load_table(self, resource_name):
"""Build table structure from resource data
:param resource_name:
"""
tabular_resource = self.__tabular_resources[resource_name]
try:
# Sorting fields in the same order as they appear in the schema
# is necessary for... | Build table structure from resource data
:param resource_name: | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/models/dataset.py#L132-L162 |
datadotworld/data.world-py | datadotworld/models/dataset.py | LocalDataset._load_dataframe | def _load_dataframe(self, resource_name):
"""Build pandas.DataFrame from resource data
Lazy load any optional dependencies in order to allow users to
use package without installing pandas if so they wish.
:param resource_name:
"""
try:
import pandas
... | python | def _load_dataframe(self, resource_name):
"""Build pandas.DataFrame from resource data
Lazy load any optional dependencies in order to allow users to
use package without installing pandas if so they wish.
:param resource_name:
"""
try:
import pandas
... | Build pandas.DataFrame from resource data
Lazy load any optional dependencies in order to allow users to
use package without installing pandas if so they wish.
:param resource_name: | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/models/dataset.py#L165-L198 |
datadotworld/data.world-py | datadotworld/client/_swagger/apis/streams_api.py | StreamsApi.append_records | def append_records(self, owner, id, stream_id, body, **kwargs):
"""
Append records to a stream.
This endpoint appends JSON data to a stream associated with a dataset. Streams don't need to be created before you can append data to it. They will be created on-demand, the first time they are used. ... | python | def append_records(self, owner, id, stream_id, body, **kwargs):
"""
Append records to a stream.
This endpoint appends JSON data to a stream associated with a dataset. Streams don't need to be created before you can append data to it. They will be created on-demand, the first time they are used. ... | Append records to a stream.
This endpoint appends JSON data to a stream associated with a dataset. Streams don't need to be created before you can append data to it. They will be created on-demand, the first time they are used. Multiple records can be appended at once by using JSON-L (`application/json-l`) as ... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/apis/streams_api.py#L43-L70 |
datadotworld/data.world-py | datadotworld/client/_swagger/apis/insights_api.py | InsightsApi.create_insight | def create_insight(self, project_owner, project_id, **kwargs):
"""
Create an insight
Create a new insight.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the r... | python | def create_insight(self, project_owner, project_id, **kwargs):
"""
Create an insight
Create a new insight.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the r... | Create an insight
Create a new insight.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(respon... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/apis/insights_api.py#L43-L69 |
datadotworld/data.world-py | datadotworld/client/_swagger/apis/insights_api.py | InsightsApi.delete_insight | def delete_insight(self, project_owner, project_id, id, **kwargs):
"""
Delete an insight
Delete an existing insight.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when recei... | python | def delete_insight(self, project_owner, project_id, id, **kwargs):
"""
Delete an insight
Delete an existing insight.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when recei... | Delete an insight
Delete an existing insight.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/apis/insights_api.py#L164-L190 |
datadotworld/data.world-py | datadotworld/client/_swagger/apis/insights_api.py | InsightsApi.get_insight | def get_insight(self, project_owner, project_id, id, **kwargs):
"""
Retrieve an insight
Retrieve an insight.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the... | python | def get_insight(self, project_owner, project_id, id, **kwargs):
"""
Retrieve an insight
Retrieve an insight.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the... | Retrieve an insight
Retrieve an insight.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(respo... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/apis/insights_api.py#L284-L310 |
datadotworld/data.world-py | datadotworld/client/_swagger/apis/insights_api.py | InsightsApi.get_insights_for_project | def get_insights_for_project(self, project_owner, project_id, **kwargs):
"""
Get insights for project.
Get insights for a project.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invo... | python | def get_insights_for_project(self, project_owner, project_id, **kwargs):
"""
Get insights for project.
Get insights for a project.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invo... | Get insights for project.
Get insights for a project.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> ... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/apis/insights_api.py#L404-L431 |
datadotworld/data.world-py | datadotworld/client/_swagger/apis/insights_api.py | InsightsApi.replace_insight | def replace_insight(self, project_owner, project_id, id, **kwargs):
"""
Replace an insight
Replace an insight.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving t... | python | def replace_insight(self, project_owner, project_id, id, **kwargs):
"""
Replace an insight
Replace an insight.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving t... | Replace an insight
Replace an insight.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(respons... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/apis/insights_api.py#L525-L552 |
datadotworld/data.world-py | datadotworld/client/_swagger/apis/insights_api.py | InsightsApi.update_insight | def update_insight(self, project_owner, project_id, id, **kwargs):
"""
Update an insight
Update an insight. Note that only elements included in the request will be updated. All omitted elements will remain untouched.
This method makes a synchronous HTTP request by default. To make an
... | python | def update_insight(self, project_owner, project_id, id, **kwargs):
"""
Update an insight
Update an insight. Note that only elements included in the request will be updated. All omitted elements will remain untouched.
This method makes a synchronous HTTP request by default. To make an
... | Update an insight
Update an insight. Note that only elements included in the request will be updated. All omitted elements will remain untouched.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invok... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/apis/insights_api.py#L653-L680 |
datadotworld/data.world-py | datadotworld/client/_swagger/models/dataset_patch_request.py | DatasetPatchRequest.summary | def summary(self, summary):
"""
Sets the summary of this DatasetPatchRequest.
Long-form dataset summary (Markdown supported).
:param summary: The summary of this DatasetPatchRequest.
:type: str
"""
if summary is not None and len(summary) > 25000:
rais... | python | def summary(self, summary):
"""
Sets the summary of this DatasetPatchRequest.
Long-form dataset summary (Markdown supported).
:param summary: The summary of this DatasetPatchRequest.
:type: str
"""
if summary is not None and len(summary) > 25000:
rais... | Sets the summary of this DatasetPatchRequest.
Long-form dataset summary (Markdown supported).
:param summary: The summary of this DatasetPatchRequest.
:type: str | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/models/dataset_patch_request.py#L147-L160 |
datadotworld/data.world-py | datadotworld/client/_swagger/models/dataset_patch_request.py | DatasetPatchRequest.license | def license(self, license):
"""
Sets the license of this DatasetPatchRequest.
Dataset license. Find additional info for allowed values [here](https://data.world/license-help).
:param license: The license of this DatasetPatchRequest.
:type: str
"""
allowed_values ... | python | def license(self, license):
"""
Sets the license of this DatasetPatchRequest.
Dataset license. Find additional info for allowed values [here](https://data.world/license-help).
:param license: The license of this DatasetPatchRequest.
:type: str
"""
allowed_values ... | Sets the license of this DatasetPatchRequest.
Dataset license. Find additional info for allowed values [here](https://data.world/license-help).
:param license: The license of this DatasetPatchRequest.
:type: str | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/models/dataset_patch_request.py#L197-L212 |
datadotworld/data.world-py | datadotworld/client/_swagger/models/dataset_patch_request.py | DatasetPatchRequest.visibility | def visibility(self, visibility):
"""
Sets the visibility of this DatasetPatchRequest.
Dataset visibility. `OPEN` if the dataset can be seen by any member of data.world. `PRIVATE` if the dataset can be seen by its owner and authorized collaborators.
:param visibility: The visibility of ... | python | def visibility(self, visibility):
"""
Sets the visibility of this DatasetPatchRequest.
Dataset visibility. `OPEN` if the dataset can be seen by any member of data.world. `PRIVATE` if the dataset can be seen by its owner and authorized collaborators.
:param visibility: The visibility of ... | Sets the visibility of this DatasetPatchRequest.
Dataset visibility. `OPEN` if the dataset can be seen by any member of data.world. `PRIVATE` if the dataset can be seen by its owner and authorized collaborators.
:param visibility: The visibility of this DatasetPatchRequest.
:type: str | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/models/dataset_patch_request.py#L226-L241 |
datadotworld/data.world-py | datadotworld/client/_swagger/models/project_put_request.py | ProjectPutRequest.objective | def objective(self, objective):
"""
Sets the objective of this ProjectPutRequest.
Short project objective.
:param objective: The objective of this ProjectPutRequest.
:type: str
"""
if objective is not None and len(objective) > 120:
raise ValueError("I... | python | def objective(self, objective):
"""
Sets the objective of this ProjectPutRequest.
Short project objective.
:param objective: The objective of this ProjectPutRequest.
:type: str
"""
if objective is not None and len(objective) > 120:
raise ValueError("I... | Sets the objective of this ProjectPutRequest.
Short project objective.
:param objective: The objective of this ProjectPutRequest.
:type: str | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/models/project_put_request.py#L125-L138 |
datadotworld/data.world-py | datadotworld/client/_swagger/api_client.py | ApiClient.__deserialize_model | def __deserialize_model(self, data, klass):
"""
Deserializes list or dict to model.
:param data: dict, list.
:param klass: class literal.
:return: model object.
"""
if not klass.swagger_types:
return data
kwargs = {}
for attr, attr_ty... | python | def __deserialize_model(self, data, klass):
"""
Deserializes list or dict to model.
:param data: dict, list.
:param klass: class literal.
:return: model object.
"""
if not klass.swagger_types:
return data
kwargs = {}
for attr, attr_ty... | Deserializes list or dict to model.
:param data: dict, list.
:param klass: class literal.
:return: model object. | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/api_client.py#L612-L633 |
datadotworld/data.world-py | datadotworld/client/_swagger/apis/projects_api.py | ProjectsApi.add_linked_dataset | def add_linked_dataset(self, owner, id, linked_dataset_owner, linked_dataset_id, **kwargs):
"""
Link dataset
Add a linked dataset to a project.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
... | python | def add_linked_dataset(self, owner, id, linked_dataset_owner, linked_dataset_id, **kwargs):
"""
Link dataset
Add a linked dataset to a project.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
... | Link dataset
Add a linked dataset to a project.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprin... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/apis/projects_api.py#L43-L70 |
datadotworld/data.world-py | datadotworld/client/_swagger/apis/projects_api.py | ProjectsApi.create_project | def create_project(self, owner, **kwargs):
"""
Create a project
Create a new project.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> ... | python | def create_project(self, owner, **kwargs):
"""
Create a project
Create a new project.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> ... | Create a project
Create a new project.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(respons... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/apis/projects_api.py#L170-L195 |
datadotworld/data.world-py | datadotworld/client/_swagger/apis/projects_api.py | ProjectsApi.delete_project | def delete_project(self, owner, id, **kwargs):
"""
Delete a project
Permanently deletes a project and all data associated with it. This operation cannot be undone, although a new project may be created with the same id.
This method makes a synchronous HTTP request by default. To make an
... | python | def delete_project(self, owner, id, **kwargs):
"""
Delete a project
Permanently deletes a project and all data associated with it. This operation cannot be undone, although a new project may be created with the same id.
This method makes a synchronous HTTP request by default. To make an
... | Delete a project
Permanently deletes a project and all data associated with it. This operation cannot be undone, although a new project may be created with the same id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` funct... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/apis/projects_api.py#L282-L307 |
datadotworld/data.world-py | datadotworld/client/_swagger/apis/projects_api.py | ProjectsApi.get_project | def get_project(self, owner, id, **kwargs):
"""
Retrieve a project
Return details on a project.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
... | python | def get_project(self, owner, id, **kwargs):
"""
Retrieve a project
Return details on a project.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
... | Retrieve a project
Return details on a project.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprin... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/apis/projects_api.py#L395-L420 |
datadotworld/data.world-py | datadotworld/client/_swagger/apis/projects_api.py | ProjectsApi.patch_project | def patch_project(self, owner, id, **kwargs):
"""
Update a project
Update an existing project. Note that only elements, files or linked datasets included in the request will be updated. All omitted elements, files or linked datasets will remain untouched.
This method makes a synchronous ... | python | def patch_project(self, owner, id, **kwargs):
"""
Update a project
Update an existing project. Note that only elements, files or linked datasets included in the request will be updated. All omitted elements, files or linked datasets will remain untouched.
This method makes a synchronous ... | Update a project
Update an existing project. Note that only elements, files or linked datasets included in the request will be updated. All omitted elements, files or linked datasets will remain untouched.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP requ... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/apis/projects_api.py#L508-L534 |
datadotworld/data.world-py | datadotworld/client/_swagger/apis/projects_api.py | ProjectsApi.remove_linked_dataset | def remove_linked_dataset(self, owner, id, linked_dataset_owner, linked_dataset_id, **kwargs):
"""
Unlink dataset
Remove a linked dataset from a project.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` func... | python | def remove_linked_dataset(self, owner, id, linked_dataset_owner, linked_dataset_id, **kwargs):
"""
Unlink dataset
Remove a linked dataset from a project.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` func... | Unlink dataset
Remove a linked dataset from a project.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> ... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/apis/projects_api.py#L629-L656 |
datadotworld/data.world-py | datadotworld/client/_swagger/apis/projects_api.py | ProjectsApi.replace_project | def replace_project(self, owner, id, **kwargs):
"""
Create / Replace a project
Create a project with a given id or completely rewrite the project, including any previously added files or linked datasets, if one already exists with the given id.
This method makes a synchronous HTTP reques... | python | def replace_project(self, owner, id, **kwargs):
"""
Create / Replace a project
Create a project with a given id or completely rewrite the project, including any previously added files or linked datasets, if one already exists with the given id.
This method makes a synchronous HTTP reques... | Create / Replace a project
Create a project with a given id or completely rewrite the project, including any previously added files or linked datasets, if one already exists with the given id.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please d... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/apis/projects_api.py#L756-L782 |
datadotworld/data.world-py | datadotworld/__init__.py | load_dataset | def load_dataset(dataset_key, force_update=False, auto_update=False,
profile='default', **kwargs):
"""Load a dataset from the local filesystem, downloading it from data.world
first, if necessary.
This function returns an object of type `LocalDataset`. The object
allows access to meteda... | python | def load_dataset(dataset_key, force_update=False, auto_update=False,
profile='default', **kwargs):
"""Load a dataset from the local filesystem, downloading it from data.world
first, if necessary.
This function returns an object of type `LocalDataset`. The object
allows access to meteda... | Load a dataset from the local filesystem, downloading it from data.world
first, if necessary.
This function returns an object of type `LocalDataset`. The object
allows access to metedata via it's `describe()` method and to all the data
via three properties `raw_data`, `tables` and `dataframes`, all of ... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/__init__.py#L65-L101 |
datadotworld/data.world-py | datadotworld/__init__.py | query | def query(dataset_key, query, query_type='sql', profile='default',
parameters=None, **kwargs):
"""Query an existing dataset
:param dataset_key: Dataset identifier, in the form of owner/id or of a url
:type dataset_key: str
:param query: SQL or SPARQL query
:type query: str
:param quer... | python | def query(dataset_key, query, query_type='sql', profile='default',
parameters=None, **kwargs):
"""Query an existing dataset
:param dataset_key: Dataset identifier, in the form of owner/id or of a url
:type dataset_key: str
:param query: SQL or SPARQL query
:type query: str
:param quer... | Query an existing dataset
:param dataset_key: Dataset identifier, in the form of owner/id or of a url
:type dataset_key: str
:param query: SQL or SPARQL query
:type query: str
:param query_type: The type of the query. Must be either 'sql' or 'sparql'.
(Default value = 'sql')
:type query... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/__init__.py#L104-L143 |
datadotworld/data.world-py | datadotworld/__init__.py | open_remote_file | def open_remote_file(dataset_key, file_name, profile='default',
mode='w', **kwargs):
"""Open a remote file object that can be used to write to or read from
a file in a data.world dataset
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:par... | python | def open_remote_file(dataset_key, file_name, profile='default',
mode='w', **kwargs):
"""Open a remote file object that can be used to write to or read from
a file in a data.world dataset
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:par... | Open a remote file object that can be used to write to or read from
a file in a data.world dataset
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param file_name: The name of the file to open
:type file_name: str
:param mode: the mode for the file - must... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/__init__.py#L146-L226 |
datadotworld/data.world-py | datadotworld/models/query.py | QueryResults.table | def table(self):
"""Build and cache a table from query results"""
if self._table is None:
self._table = list(self._iter_rows())
return self._table | python | def table(self):
"""Build and cache a table from query results"""
if self._table is None:
self._table = list(self._iter_rows())
return self._table | Build and cache a table from query results | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/models/query.py#L63-L68 |
datadotworld/data.world-py | datadotworld/models/query.py | QueryResults.dataframe | def dataframe(self):
"""Build and cache a dataframe from query results"""
if self._dataframe is None:
try:
import pandas as pd
except ImportError:
raise RuntimeError('To enable dataframe support, '
'run \'pip ins... | python | def dataframe(self):
"""Build and cache a dataframe from query results"""
if self._dataframe is None:
try:
import pandas as pd
except ImportError:
raise RuntimeError('To enable dataframe support, '
'run \'pip ins... | Build and cache a dataframe from query results | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/models/query.py#L71-L84 |
datadotworld/data.world-py | datadotworld/models/table_schema.py | fields_to_dtypes | def fields_to_dtypes(schema):
"""Maps table schema fields types to dtypes separating date fields
:param schema:
"""
datetime_types = ['date', 'datetime']
datetime_fields = {
f['name']: _TABLE_SCHEMA_DTYPE_MAPPING.get(f['type'], 'object')
for f in schema['fields']
if f['type'... | python | def fields_to_dtypes(schema):
"""Maps table schema fields types to dtypes separating date fields
:param schema:
"""
datetime_types = ['date', 'datetime']
datetime_fields = {
f['name']: _TABLE_SCHEMA_DTYPE_MAPPING.get(f['type'], 'object')
for f in schema['fields']
if f['type'... | Maps table schema fields types to dtypes separating date fields
:param schema: | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/models/table_schema.py#L90-L106 |
datadotworld/data.world-py | datadotworld/models/table_schema.py | sanitize_resource_schema | def sanitize_resource_schema(r):
"""Sanitize table schema for increased compatibility
Up to version 0.9.0 jsontableschema did not support
year, yearmonth and duration field types
https://github.com/frictionlessdata/jsontableschema-py/pull/152
:param r:
"""
if 'schema' in r.descriptor:
... | python | def sanitize_resource_schema(r):
"""Sanitize table schema for increased compatibility
Up to version 0.9.0 jsontableschema did not support
year, yearmonth and duration field types
https://github.com/frictionlessdata/jsontableschema-py/pull/152
:param r:
"""
if 'schema' in r.descriptor:
... | Sanitize table schema for increased compatibility
Up to version 0.9.0 jsontableschema did not support
year, yearmonth and duration field types
https://github.com/frictionlessdata/jsontableschema-py/pull/152
:param r: | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/models/table_schema.py#L109-L121 |
datadotworld/data.world-py | datadotworld/models/table_schema.py | infer_table_schema | def infer_table_schema(sparql_results_json):
"""Infer Table Schema from SPARQL results JSON
SPARQL JSON Results Spec:
https://www.w3.org/TR/2013/REC-sparql11-results-json-20130321
:param sparql_results_json: SPARQL JSON results of a query
:returns: A schema descriptor for the inferred schema
:... | python | def infer_table_schema(sparql_results_json):
"""Infer Table Schema from SPARQL results JSON
SPARQL JSON Results Spec:
https://www.w3.org/TR/2013/REC-sparql11-results-json-20130321
:param sparql_results_json: SPARQL JSON results of a query
:returns: A schema descriptor for the inferred schema
:... | Infer Table Schema from SPARQL results JSON
SPARQL JSON Results Spec:
https://www.w3.org/TR/2013/REC-sparql11-results-json-20130321
:param sparql_results_json: SPARQL JSON results of a query
:returns: A schema descriptor for the inferred schema
:rtype: dict (json) | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/models/table_schema.py#L124-L186 |
datadotworld/data.world-py | datadotworld/models/table_schema.py | order_columns_in_row | def order_columns_in_row(fields, unordered_row):
"""Ensure columns appear in the same order for every row in table
:param fields:
:param unordered_row:
"""
fields_idx = {f: pos for pos, f in enumerate(fields)}
return OrderedDict(sorted(unordered_row.items(),
key=la... | python | def order_columns_in_row(fields, unordered_row):
"""Ensure columns appear in the same order for every row in table
:param fields:
:param unordered_row:
"""
fields_idx = {f: pos for pos, f in enumerate(fields)}
return OrderedDict(sorted(unordered_row.items(),
key=la... | Ensure columns appear in the same order for every row in table
:param fields:
:param unordered_row: | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/models/table_schema.py#L203-L211 |
datadotworld/data.world-py | datadotworld/models/table_schema.py | _get_types_from_sample | def _get_types_from_sample(result_vars, sparql_results_json):
"""Return types if homogenous within sample
Compare up to 10 rows of results to determine homogeneity.
DESCRIBE and CONSTRUCT queries, for example,
:param result_vars:
:param sparql_results_json:
"""
total_bindings = len(sparql... | python | def _get_types_from_sample(result_vars, sparql_results_json):
"""Return types if homogenous within sample
Compare up to 10 rows of results to determine homogeneity.
DESCRIBE and CONSTRUCT queries, for example,
:param result_vars:
:param sparql_results_json:
"""
total_bindings = len(sparql... | Return types if homogenous within sample
Compare up to 10 rows of results to determine homogeneity.
DESCRIBE and CONSTRUCT queries, for example,
:param result_vars:
:param sparql_results_json: | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/models/table_schema.py#L285-L314 |
datadotworld/data.world-py | datadotworld/config.py | FileConfig.save | def save(self):
"""Persist config changes"""
with open(self._config_file_path, 'w') as file:
self._config_parser.write(file) | python | def save(self):
"""Persist config changes"""
with open(self._config_file_path, 'w') as file:
self._config_parser.write(file) | Persist config changes | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/config.py#L140-L143 |
datadotworld/data.world-py | datadotworld/config.py | ChainedConfig._first_not_none | def _first_not_none(seq, supplier_func):
"""Applies supplier_func to each element in seq, returns 1st not None
:param seq: Sequence of object
:type seq: iterable
:param supplier_func: Function that extracts the desired value from
elements in seq
:type supplier_func: ... | python | def _first_not_none(seq, supplier_func):
"""Applies supplier_func to each element in seq, returns 1st not None
:param seq: Sequence of object
:type seq: iterable
:param supplier_func: Function that extracts the desired value from
elements in seq
:type supplier_func: ... | Applies supplier_func to each element in seq, returns 1st not None
:param seq: Sequence of object
:type seq: iterable
:param supplier_func: Function that extracts the desired value from
elements in seq
:type supplier_func: function | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/config.py#L217-L231 |
datadotworld/data.world-py | datadotworld/cli.py | cli | def cli(ctx, profile):
"""dw commands support working with multiple data.world accounts
\b
Use a different <profile> value for each account.
In the absence of a <profile>, 'default' will be used.
"""
if ctx.obj is None:
ctx.obj = {}
ctx.obj['profile'] = profile
pass | python | def cli(ctx, profile):
"""dw commands support working with multiple data.world accounts
\b
Use a different <profile> value for each account.
In the absence of a <profile>, 'default' will be used.
"""
if ctx.obj is None:
ctx.obj = {}
ctx.obj['profile'] = profile
pass | dw commands support working with multiple data.world accounts
\b
Use a different <profile> value for each account.
In the absence of a <profile>, 'default' will be used. | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/cli.py#L31-L41 |
datadotworld/data.world-py | datadotworld/cli.py | configure | def configure(obj, token):
"""Use this command to configure API tokens
"""
config = obj.get('config') or FileConfig(obj['profile'])
config.auth_token = token
config.save() | python | def configure(obj, token):
"""Use this command to configure API tokens
"""
config = obj.get('config') or FileConfig(obj['profile'])
config.auth_token = token
config.save() | Use this command to configure API tokens | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/cli.py#L50-L55 |
datadotworld/data.world-py | datadotworld/client/_swagger/models/file_source_create_or_update_request.py | FileSourceCreateOrUpdateRequest.request_entity | def request_entity(self, request_entity):
"""
Sets the request_entity of this FileSourceCreateOrUpdateRequest.
:param request_entity: The request_entity of this FileSourceCreateOrUpdateRequest.
:type: str
"""
if request_entity is not None and len(request_entity) > 10000:... | python | def request_entity(self, request_entity):
"""
Sets the request_entity of this FileSourceCreateOrUpdateRequest.
:param request_entity: The request_entity of this FileSourceCreateOrUpdateRequest.
:type: str
"""
if request_entity is not None and len(request_entity) > 10000:... | Sets the request_entity of this FileSourceCreateOrUpdateRequest.
:param request_entity: The request_entity of this FileSourceCreateOrUpdateRequest.
:type: str | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/models/file_source_create_or_update_request.py#L178-L188 |
datadotworld/data.world-py | datadotworld/client/_swagger/models/insight_put_request.py | InsightPutRequest.title | def title(self, title):
"""
Sets the title of this InsightPutRequest.
Insight title.
:param title: The title of this InsightPutRequest.
:type: str
"""
if title is None:
raise ValueError("Invalid value for `title`, must not be `None`")
if title... | python | def title(self, title):
"""
Sets the title of this InsightPutRequest.
Insight title.
:param title: The title of this InsightPutRequest.
:type: str
"""
if title is None:
raise ValueError("Invalid value for `title`, must not be `None`")
if title... | Sets the title of this InsightPutRequest.
Insight title.
:param title: The title of this InsightPutRequest.
:type: str | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/models/insight_put_request.py#L81-L96 |
datadotworld/data.world-py | datadotworld/client/_swagger/apis/sparql_api.py | SparqlApi.sparql_get | def sparql_get(self, owner, id, query, **kwargs):
"""
SPARQL query (via GET)
This endpoint executes SPARQL queries against a dataset or data project. SPARQL results are available in a variety of formats. By default, `application/sparql-results+json` will be returned. Set the `Accept` header to ... | python | def sparql_get(self, owner, id, query, **kwargs):
"""
SPARQL query (via GET)
This endpoint executes SPARQL queries against a dataset or data project. SPARQL results are available in a variety of formats. By default, `application/sparql-results+json` will be returned. Set the `Accept` header to ... | SPARQL query (via GET)
This endpoint executes SPARQL queries against a dataset or data project. SPARQL results are available in a variety of formats. By default, `application/sparql-results+json` will be returned. Set the `Accept` header to one of the following values in accordance with your preference: - `ap... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/apis/sparql_api.py#L43-L69 |
datadotworld/data.world-py | datadotworld/client/_swagger/apis/sparql_api.py | SparqlApi.sparql_post | def sparql_post(self, owner, id, query, **kwargs):
"""
SPARQL query
This endpoint executes SPARQL queries against a dataset or data project. SPARQL results are available in a variety of formats. By default, `application/sparql-results+json` will be returned. Set the `Accept` header to one of ... | python | def sparql_post(self, owner, id, query, **kwargs):
"""
SPARQL query
This endpoint executes SPARQL queries against a dataset or data project. SPARQL results are available in a variety of formats. By default, `application/sparql-results+json` will be returned. Set the `Accept` header to one of ... | SPARQL query
This endpoint executes SPARQL queries against a dataset or data project. SPARQL results are available in a variety of formats. By default, `application/sparql-results+json` will be returned. Set the `Accept` header to one of the following values in accordance with your preference: - `applicatio... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/_swagger/apis/sparql_api.py#L163-L189 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.get_dataset | def get_dataset(self, dataset_key):
"""Retrieve an existing dataset definition
This method retrieves metadata about an existing
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:returns: Dataset definition, with all attributes
:rtyp... | python | def get_dataset(self, dataset_key):
"""Retrieve an existing dataset definition
This method retrieves metadata about an existing
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:returns: Dataset definition, with all attributes
:rtyp... | Retrieve an existing dataset definition
This method retrieves metadata about an existing
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:returns: Dataset definition, with all attributes
:rtype: dict
:raises RestApiException: If a ... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L78-L102 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.create_dataset | def create_dataset(self, owner_id, **kwargs):
"""Create a new dataset
:param owner_id: Username of the owner of the new dataset
:type owner_id: str
:param title: Dataset title (will be used to generate dataset id on
creation)
:type title: str
:param descripti... | python | def create_dataset(self, owner_id, **kwargs):
"""Create a new dataset
:param owner_id: Username of the owner of the new dataset
:type owner_id: str
:param title: Dataset title (will be used to generate dataset id on
creation)
:type title: str
:param descripti... | Create a new dataset
:param owner_id: Username of the owner of the new dataset
:type owner_id: str
:param title: Dataset title (will be used to generate dataset id on
creation)
:type title: str
:param description: Dataset description
:type description: str, o... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L104-L160 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.update_dataset | def update_dataset(self, dataset_key, **kwargs):
"""Update an existing dataset
:param description: Dataset description
:type description: str, optional
:param summary: Dataset summary markdown
:type summary: str, optional
:param tags: Dataset tags
:type tags: lis... | python | def update_dataset(self, dataset_key, **kwargs):
"""Update an existing dataset
:param description: Dataset description
:type description: str, optional
:param summary: Dataset summary markdown
:type summary: str, optional
:param tags: Dataset tags
:type tags: lis... | Update an existing dataset
:param description: Dataset description
:type description: str, optional
:param summary: Dataset summary markdown
:type summary: str, optional
:param tags: Dataset tags
:type tags: list, optional
:param license: Dataset license
... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L162-L206 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.replace_dataset | def replace_dataset(self, dataset_key, **kwargs):
"""Replace an existing dataset
*This method will completely overwrite an existing dataset.*
:param description: Dataset description
:type description: str, optional
:param summary: Dataset summary markdown
:type summary:... | python | def replace_dataset(self, dataset_key, **kwargs):
"""Replace an existing dataset
*This method will completely overwrite an existing dataset.*
:param description: Dataset description
:type description: str, optional
:param summary: Dataset summary markdown
:type summary:... | Replace an existing dataset
*This method will completely overwrite an existing dataset.*
:param description: Dataset description
:type description: str, optional
:param summary: Dataset summary markdown
:type summary: str, optional
:param tags: Dataset tags
:typ... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L208-L258 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.delete_dataset | def delete_dataset(self, dataset_key):
"""Deletes a dataset and all associated data
:params dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:raises RestApiException: If a server error occurs
Examples
--------
>>> import datadotwor... | python | def delete_dataset(self, dataset_key):
"""Deletes a dataset and all associated data
:params dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:raises RestApiException: If a server error occurs
Examples
--------
>>> import datadotwor... | Deletes a dataset and all associated data
:params dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:raises RestApiException: If a server error occurs
Examples
--------
>>> import datadotworld as dw
>>> api_client = dw.api_client()
... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L260-L278 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.add_files_via_url | def add_files_via_url(self, dataset_key, files={}):
"""Add or update dataset files linked to source URLs
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param files: Dict containing the name of files and metadata
Uses file name as a di... | python | def add_files_via_url(self, dataset_key, files={}):
"""Add or update dataset files linked to source URLs
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param files: Dict containing the name of files and metadata
Uses file name as a di... | Add or update dataset files linked to source URLs
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param files: Dict containing the name of files and metadata
Uses file name as a dict containing File description, labels and
source U... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L282-L321 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.sync_files | def sync_files(self, dataset_key):
"""Trigger synchronization process to update all dataset files linked to
source URLs.
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:raises RestApiException: If a server error occurs
Examples
... | python | def sync_files(self, dataset_key):
"""Trigger synchronization process to update all dataset files linked to
source URLs.
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:raises RestApiException: If a server error occurs
Examples
... | Trigger synchronization process to update all dataset files linked to
source URLs.
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:raises RestApiException: If a server error occurs
Examples
--------
>>> import datadotworld... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L323-L340 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.upload_files | def upload_files(self, dataset_key, files, files_metadata={}, **kwargs):
"""Upload dataset files
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param files: The list of names/paths for files stored in the
local filesystem
:type fi... | python | def upload_files(self, dataset_key, files, files_metadata={}, **kwargs):
"""Upload dataset files
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param files: The list of names/paths for files stored in the
local filesystem
:type fi... | Upload dataset files
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param files: The list of names/paths for files stored in the
local filesystem
:type files: list of str
:param expand_archives: Boolean value to indicate files sho... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L342-L374 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.upload_file | def upload_file(self, dataset_key, name, file_metadata={}, **kwargs):
"""Upload one file to a dataset
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param name: Name/path for files stored in the local filesystem
:type name: str
:p... | python | def upload_file(self, dataset_key, name, file_metadata={}, **kwargs):
"""Upload one file to a dataset
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param name: Name/path for files stored in the local filesystem
:type name: str
:p... | Upload one file to a dataset
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param name: Name/path for files stored in the local filesystem
:type name: str
:param expand_archives: Boolean value to indicate files should be
expanded ... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L376-L406 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.delete_files | def delete_files(self, dataset_key, names):
"""Delete dataset file(s)
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param names: The list of names for files to be deleted
:type names: list of str
:raises RestApiException: If a se... | python | def delete_files(self, dataset_key, names):
"""Delete dataset file(s)
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param names: The list of names for files to be deleted
:type names: list of str
:raises RestApiException: If a se... | Delete dataset file(s)
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param names: The list of names for files to be deleted
:type names: list of str
:raises RestApiException: If a server error occurs
Examples
--------
... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L408-L429 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.download_datapackage | def download_datapackage(self, dataset_key, dest_dir):
"""Download and unzip a dataset's datapackage
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param dest_dir: Directory under which datapackage should be saved
:type dest_dir: str or p... | python | def download_datapackage(self, dataset_key, dest_dir):
"""Download and unzip a dataset's datapackage
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param dest_dir: Directory under which datapackage should be saved
:type dest_dir: str or p... | Download and unzip a dataset's datapackage
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param dest_dir: Directory under which datapackage should be saved
:type dest_dir: str or path
:returns: Location of the datapackage descriptor (data... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L433-L497 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.get_user_data | def get_user_data(self):
"""Retrieve data for authenticated user
:returns: User data, with all attributes
:rtype: dict
:raises RestApiException: If a server error occurs
Examples
--------
>>> import datadotworld as dw
>>> api_client = dw.api_client()
... | python | def get_user_data(self):
"""Retrieve data for authenticated user
:returns: User data, with all attributes
:rtype: dict
:raises RestApiException: If a server error occurs
Examples
--------
>>> import datadotworld as dw
>>> api_client = dw.api_client()
... | Retrieve data for authenticated user
:returns: User data, with all attributes
:rtype: dict
:raises RestApiException: If a server error occurs
Examples
--------
>>> import datadotworld as dw
>>> api_client = dw.api_client()
>>> user_data = api_client.get_... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L501-L519 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.fetch_contributing_projects | def fetch_contributing_projects(self, **kwargs):
"""Fetch projects that the currently authenticated user has access to
:returns: Authenticated user projects
:rtype: dict
:raises RestApiException: If a server error occurs
Examples
--------
>>> import datadotworld... | python | def fetch_contributing_projects(self, **kwargs):
"""Fetch projects that the currently authenticated user has access to
:returns: Authenticated user projects
:rtype: dict
:raises RestApiException: If a server error occurs
Examples
--------
>>> import datadotworld... | Fetch projects that the currently authenticated user has access to
:returns: Authenticated user projects
:rtype: dict
:raises RestApiException: If a server error occurs
Examples
--------
>>> import datadotworld as dw
>>> api_client = dw.api_client()
>>> ... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L600-L619 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.sql | def sql(self, dataset_key, query, desired_mimetype='application/json',
**kwargs):
"""Executes SQL queries against a dataset via POST
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param query: SQL query
:type query: str
... | python | def sql(self, dataset_key, query, desired_mimetype='application/json',
**kwargs):
"""Executes SQL queries against a dataset via POST
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param query: SQL query
:type query: str
... | Executes SQL queries against a dataset via POST
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param query: SQL query
:type query: str
:param include_table_schema: Flags indicating to include table schema
in the response
... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L661-L692 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.sparql | def sparql(self, dataset_key, query,
desired_mimetype='application/sparql-results+json', **kwargs):
"""Executes SPARQL queries against a dataset via POST
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param query: SPARQL query
... | python | def sparql(self, dataset_key, query,
desired_mimetype='application/sparql-results+json', **kwargs):
"""Executes SPARQL queries against a dataset via POST
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param query: SPARQL query
... | Executes SPARQL queries against a dataset via POST
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param query: SPARQL query
:type query: str
:returns: file object that can be used in file parsers and
data handling modules.
... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L696-L726 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.download_dataset | def download_dataset(self, dataset_key):
"""Return a .zip containing all files within the dataset as uploaded.
:param dataset_key : Dataset identifier, in the form of owner/id
:type dataset_key: str
:returns: .zip file contain files within dataset
:rtype: file object
:ra... | python | def download_dataset(self, dataset_key):
"""Return a .zip containing all files within the dataset as uploaded.
:param dataset_key : Dataset identifier, in the form of owner/id
:type dataset_key: str
:returns: .zip file contain files within dataset
:rtype: file object
:ra... | Return a .zip containing all files within the dataset as uploaded.
:param dataset_key : Dataset identifier, in the form of owner/id
:type dataset_key: str
:returns: .zip file contain files within dataset
:rtype: file object
:raises RestApiException: If a server error occurs
... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L730-L750 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.append_records | def append_records(self, dataset_key, stream_id, body):
"""Append records to a stream.
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param stream_id: Stream unique identifier.
:type stream_id: str
:param body: Object body
... | python | def append_records(self, dataset_key, stream_id, body):
"""Append records to a stream.
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param stream_id: Stream unique identifier.
:type stream_id: str
:param body: Object body
... | Append records to a stream.
:param dataset_key: Dataset identifier, in the form of owner/id
:type dataset_key: str
:param stream_id: Stream unique identifier.
:type stream_id: str
:param body: Object body
:type body: obj
:raises RestApiException: If a server erro... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L778-L801 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.get_project | def get_project(self, project_key):
"""Retrieve an existing project
This method retrieves metadata about an existing project
:param project_key: Project identifier, in the form of owner/id
:type project_key: str
:returns: Project definition, with all attributes
:rtype: ... | python | def get_project(self, project_key):
"""Retrieve an existing project
This method retrieves metadata about an existing project
:param project_key: Project identifier, in the form of owner/id
:type project_key: str
:returns: Project definition, with all attributes
:rtype: ... | Retrieve an existing project
This method retrieves metadata about an existing project
:param project_key: Project identifier, in the form of owner/id
:type project_key: str
:returns: Project definition, with all attributes
:rtype: dict
:raises RestApiException: If a ser... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L805-L832 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.create_project | def create_project(self, owner_id, **kwargs):
"""Create a new project
:param owner_id: Username of the creator of a
project.
:type owner_id: str
:param title: Project title (will be used to generate project id on
creation)
:type title: str
:param ... | python | def create_project(self, owner_id, **kwargs):
"""Create a new project
:param owner_id: Username of the creator of a
project.
:type owner_id: str
:param title: Project title (will be used to generate project id on
creation)
:type title: str
:param ... | Create a new project
:param owner_id: Username of the creator of a
project.
:type owner_id: str
:param title: Project title (will be used to generate project id on
creation)
:type title: str
:param objective: Short project objective.
:type objecti... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L834-L891 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.update_project | def update_project(self, project_key, **kwargs):
"""Update an existing project
:param project_key: Username and unique identifier of the creator of a
project in the form of owner/id.
:type project_key: str
:param title: Project title
:type title: str
:param o... | python | def update_project(self, project_key, **kwargs):
"""Update an existing project
:param project_key: Username and unique identifier of the creator of a
project in the form of owner/id.
:type project_key: str
:param title: Project title
:type title: str
:param o... | Update an existing project
:param project_key: Username and unique identifier of the creator of a
project in the form of owner/id.
:type project_key: str
:param title: Project title
:type title: str
:param objective: Short project objective.
:type objective: ... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L893-L945 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.replace_project | def replace_project(self, project_key, **kwargs):
"""Replace an existing Project
*Create a project with a given id or completely rewrite the project,
including any previously added files or linked datasets, if one already
exists with the given id.*
:param project_key: Username ... | python | def replace_project(self, project_key, **kwargs):
"""Replace an existing Project
*Create a project with a given id or completely rewrite the project,
including any previously added files or linked datasets, if one already
exists with the given id.*
:param project_key: Username ... | Replace an existing Project
*Create a project with a given id or completely rewrite the project,
including any previously added files or linked datasets, if one already
exists with the given id.*
:param project_key: Username and unique identifier of the creator of a
project... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L947-L1008 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.add_linked_dataset | def add_linked_dataset(self, project_key, dataset_key):
"""Link project to an existing dataset
This method links a dataset to project
:param project_key: Project identifier, in the form of owner/id
:type project_key: str
:param dataset_key: Dataset identifier, in the form of ow... | python | def add_linked_dataset(self, project_key, dataset_key):
"""Link project to an existing dataset
This method links a dataset to project
:param project_key: Project identifier, in the form of owner/id
:type project_key: str
:param dataset_key: Dataset identifier, in the form of ow... | Link project to an existing dataset
This method links a dataset to project
:param project_key: Project identifier, in the form of owner/id
:type project_key: str
:param dataset_key: Dataset identifier, in the form of owner/id
:type project_key: str
:raises RestApiExcept... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L1010-L1037 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.get_insight | def get_insight(self, project_key, insight_id, **kwargs):
"""Retrieve an insight
:param project_key: Project identifier, in the form of
projectOwner/projectid
:type project_key: str
:param insight_id: Insight unique identifier.
:type insight_id: str
:returns: Ins... | python | def get_insight(self, project_key, insight_id, **kwargs):
"""Retrieve an insight
:param project_key: Project identifier, in the form of
projectOwner/projectid
:type project_key: str
:param insight_id: Insight unique identifier.
:type insight_id: str
:returns: Ins... | Retrieve an insight
:param project_key: Project identifier, in the form of
projectOwner/projectid
:type project_key: str
:param insight_id: Insight unique identifier.
:type insight_id: str
:returns: Insight definition, with all attributes
:rtype: object
:... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L1090-L1120 |
datadotworld/data.world-py | datadotworld/client/api.py | RestApiClient.get_insights_for_project | def get_insights_for_project(self, project_key, **kwargs):
"""Get insights for a project.
:param project_key: Project identifier, in the form of
projectOwner/projectid
:type project_key: str
:returns: Insight results
:rtype: object
:raises RestApiException: If a ... | python | def get_insights_for_project(self, project_key, **kwargs):
"""Get insights for a project.
:param project_key: Project identifier, in the form of
projectOwner/projectid
:type project_key: str
:returns: Insight results
:rtype: object
:raises RestApiException: If a ... | Get insights for a project.
:param project_key: Project identifier, in the form of
projectOwner/projectid
:type project_key: str
:returns: Insight results
:rtype: object
:raises RestApiException: If a server error occurs
Examples
--------
>>> imp... | https://github.com/datadotworld/data.world-py/blob/ffaeb115f358731ab0b805b0c43b7ff2e3cf0a77/datadotworld/client/api.py#L1122-L1147 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.