asphalt.feedreader.component

class asphalt.feedreader.component.FeedReaderComponent(feeds: typing.Dict[str, typing.Dict[str, typing.Any]] = None, stores: typing.Dict[str, typing.Dict[str, typing.Any]] = None, **feed_defaults)

Bases: asphalt.core.component.Component

Creates FeedReader resources.

Parameters:
coroutine asphalt.feedreader.component.create_feed(ctx, reader=None, **reader_args)

Create and start a syndication feed.

Note

This function does NOT add the feed to the context as a resource.

Parameters:
  • ctx (Context) – a context object (passed to the start() method)
  • reader (Union[str, type, None]) –

    specifies the feed reader class by one of the following means:

    • a subclass of FeedReader
    • the entry point name of one
    • a module:varname reference to one
    • None to attempt automatic detection of the feed type
  • reader_args – keyword arguments passed to the feed reader class
Return type:

FeedReader

Returns:

a feed reader