Skip to content
module

rsconnect.models

Data models

Classes
  • AppMode Data class defining an "app mode" as understood by RStudio Connect</>
  • AppModes Enumeration-like collection of known AppModes with lookup functions</>
  • GlobMatcher A simplified means of matching a path against a glob pattern. The key limitation is that we support at most one occurrence of the ** pattern.</>
  • GlobSet Matches against a set of GlobMatcher patterns</>
class

rsconnect.models.AppMode(ordinal, name, text, ext=None)

Data class defining an "app mode" as understood by RStudio Connect

class

rsconnect.models.AppModes()

Enumeration-like collection of known AppModes with lookup functions

Methods
  • get_by_extension(extension, return_unknown) Get an app mode by its associated extension</>
  • get_by_name(name, return_unknown) Get an AppMode by name</>
  • get_by_ordinal(ordinal, return_unknown) Get an AppMode by its associated ordinal (integer)</>
classmethod

get_by_ordinal(ordinal, return_unknown=False)

Get an AppMode by its associated ordinal (integer)

classmethod

get_by_name(name, return_unknown=False)

Get an AppMode by name

classmethod

get_by_extension(extension, return_unknown=False)

Get an app mode by its associated extension

class

rsconnect.models.GlobMatcher(pattern)

A simplified means of matching a path against a glob pattern. The key limitation is that we support at most one occurrence of the ** pattern.

class

rsconnect.models.GlobSet(patterns)

Matches against a set of GlobMatcher patterns

Methods
  • matches(path) Determines whether the given path is matched by any of our glob expressions.</>
method

matches(path)

Determines whether the given path is matched by any of our glob expressions.

:param path: the path to test. :return: True, if the given path matches any of our glob patterns.