Save an RSS or ATOM feed to a SQLITE database
Download an RSS or Atom feed and save it to a SQLite database. This is meant to work well with datasette.
pip install feed-to-sqlite
feed-to-sqlite feeds.db http://chrisamico.newsblur.com/social/rss/35501/chrisamico https://www.instapaper.com/starred/rss/13475/qUh7yaOUGOSQeANThMyxXdYnho
This will use a SQLite database called
feeds.db, creating it if necessary. By default, each feed gets its own table, named based on a slugified version of the feed's title.
To load all items from multiple feeds into a common (or pre-existing) table, pass a
feed-to-sqlite feeds.db --table links <url> <url>
That will put all items in a table called
Each feed also creates an entry in a
feeds table containing top-level metadata for each feed. Each item will have a foreign key to the originating feed. This is especially useful if combining feeds into a shared table.
ingest_feed, does most of the work here. The following will create a database called
feeds.db and download my NewsBlur shared items into a new table called
from feed_to_sqlite import ingest_feed url = "http://chrisamico.newsblur.com/social/rss/35501/chrisamico" ingest_feed("feeds.db", url=url, table_name="links")
Tests use pytest. Run
pytest tests/ to run the test suite.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size feed_to_sqlite-0.2.0-py3-none-any.whl (5.4 kB)||File type Wheel||Python version py3||Upload date||Hashes View hashes|
|Filename, size feed-to-sqlite-0.2.0.tar.gz (3.7 kB)||File type Source||Python version None||Upload date||Hashes View hashes|
Hashes for feed_to_sqlite-0.2.0-py3-none-any.whl