flux.uri.uri module

class flux.uri.uri.FluxURIResolver(pluginpath=None)

Bases: object

A plugin-based Flux job URI resolver class

A FluxURIResolver loads plugins which implement different _schemes_ for resolution simple URIs to Flux job URIs. Plugins or "resolvers" are loaded from the flux.uri.resolvers namespace.


Get a dict of loaded URI resolver plugins by {name: description}


Resolve uri to a Flux job URI using dynamically loaded plugins

The _scheme_ of the provided target URI determines which plugin is used to satisfy the query.

If no _scheme_ is provided, then a default scheme of jobid is assumed.

URI "query" parameters may be supported by the underlying resolver plugin, but the remote and local query strings are always supported and will result in forced conversion of the returned job URI to a remote or local form, respectively.

Raises NotImplementedError if no plugin for _scheme_ can be found.

Raises ValueError if uri cannot otherwise be converted to a job uri by the plugin for _scheme_.

class flux.uri.uri.JobURI(uri)

Bases: flux.uri.uri.URI

A Flux job/instance URI

A URI specific to a Flux instance. Same attributes as flux.uri.URI, with additional attributes to convert to a remote or local URI.


If local URI, returns a remote URI substituting current hostname. If a remote URI, returns the URI.


If a remote URI, convert to a local URI. Otherwise return the URI.

force_local = False
property local
property remote
class flux.uri.uri.URI(uri)

Bases: object

Simple URI class

Parse URI strings with urllib.parse.urlparse, but with mutable properties


copy of original uri argument


addressing scheme


network location part


path part


parameters if present


query component


query component as dictionary


fragment identifier

class flux.uri.uri.URIResolverPlugin(*args)

Bases: abc.ABC

Abstract type for a plugin used to resolve Flux URIs

abstract describe()

Return a short description of the support URI scheme

abstract resolve(uri)

Resolve a get-uri URI into a FluxJobURI

class flux.uri.uri.URIResolverURI(uri)

Bases: flux.uri.uri.URI

A URI which resolves to a JobURI

A URI used with FluxURIResolver.resolve. Includes a workaround for urllib.parse.urlparse problems parsing path components with only digits.