Skip to main content

Periodically refresh Datasette metadata from a remote URL

Project description

datasette-remote-metadata

PyPI Changelog Tests License

Periodically refresh Datasette metadata from a remote URL

Installation

Install this plugin in the same environment as Datasette.

$ datasette install datasette-remote-metadata

Usage

Add the following to your metadata.json:

{
    "plugins": {
        "datasette-remote-metadata": {
            "url": "https://example.com/remote-metadata.yml"
        }
    }
}

The plugin will fetch the specified metadata from that URL at startup and combine it with any existing metadata. You can use a URL to either a JSON file or a YAML file.

It will periodically refresh that metadata - by default every 30 seconds, unless you specify an alternative "ttl" value in the plugin configuration.

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-remote-metadata
python3 -mvenv venv
source venv/bin/activate

Or if you are using pipenv:

pipenv shell

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datasette-remote-metadata-0.1a0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file datasette-remote-metadata-0.1a0.tar.gz.

File metadata

  • Download URL: datasette-remote-metadata-0.1a0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for datasette-remote-metadata-0.1a0.tar.gz
Algorithm Hash digest
SHA256 010d9c34cf34e9a8944a6ff6f358f057cb380799029a914b2f35abe64b2c359e
MD5 6cd81c89728c301f7d8e4ef197b6dc6b
BLAKE2b-256 ca70c986add50dfc199dadc22fecc4bb92e7a2bcef28687583daeb5d1111bb64

See more details on using hashes here.

File details

Details for the file datasette_remote_metadata-0.1a0-py3-none-any.whl.

File metadata

  • Download URL: datasette_remote_metadata-0.1a0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for datasette_remote_metadata-0.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 c12dba1935fd28f105ae9e0b037aa2479ce1267b06a89588390a729d1ecb564c
MD5 4b01ddd2a10cac8bd786afc9f53091c8
BLAKE2b-256 6542f036e1b9ee9c8f1c595c62ebe8a25a239f736579c207c380bc77aa4ab53a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page