datasette-proxy-url


Namedatasette-proxy-url JSON
Version 0.1.1 PyPI version JSON
download
home_page
SummaryProxy a URL through a Datasette instance
upload_time2024-01-23 20:35:55
maintainer
docs_urlNone
authorSimon Willison
requires_python>=3.8
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # datasette-proxy-url

[![PyPI](https://img.shields.io/pypi/v/datasette-proxy-url.svg)](https://pypi.org/project/datasette-proxy-url/)
[![Changelog](https://img.shields.io/github/v/release/datasette/datasette-proxy-url?include_prereleases&label=changelog)](https://github.com/datasette/datasette-proxy-url/releases)
[![Tests](https://github.com/datasette/datasette-proxy-url/actions/workflows/test.yml/badge.svg)](https://github.com/datasette/datasette-proxy-url/actions/workflows/test.yml)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/datasette/datasette-proxy-url/blob/main/LICENSE)

Proxy a URL through a Datasette instance

## Installation

Install this plugin in the same environment as Datasette.
```bash
datasette install datasette-proxy-url
```
## Usage

This plugin can be configured to set specific paths within Datasette to proxy content from another URL.

Configure the plugin like this:
```json
{
    "plugins": {
        "datasette-proxy-url": {
            "paths": [
                {"path": "/proxy", "backend": "http://example.com/"},
            ]
        }
    }
}
```
Now any request to `/proxy` will serve the HTML content from `http://example.com/`.

The `content-type` response header and the content body will be passed through. All other headers are currently ignored.

## Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:
```bash
cd datasette-proxy-url
python3 -m venv venv
source venv/bin/activate
```
Now install the dependencies and test dependencies:
```bash
pip install -e '.[test]'
```
To run the tests:
```bash
pytest
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "datasette-proxy-url",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "Simon Willison",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/3d/2e/6efa198f7cdab54d4ecefb49f3eac6d478d491d0027f245757282d21a177/datasette-proxy-url-0.1.1.tar.gz",
    "platform": null,
    "description": "# datasette-proxy-url\n\n[![PyPI](https://img.shields.io/pypi/v/datasette-proxy-url.svg)](https://pypi.org/project/datasette-proxy-url/)\n[![Changelog](https://img.shields.io/github/v/release/datasette/datasette-proxy-url?include_prereleases&label=changelog)](https://github.com/datasette/datasette-proxy-url/releases)\n[![Tests](https://github.com/datasette/datasette-proxy-url/actions/workflows/test.yml/badge.svg)](https://github.com/datasette/datasette-proxy-url/actions/workflows/test.yml)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/datasette/datasette-proxy-url/blob/main/LICENSE)\n\nProxy a URL through a Datasette instance\n\n## Installation\n\nInstall this plugin in the same environment as Datasette.\n```bash\ndatasette install datasette-proxy-url\n```\n## Usage\n\nThis plugin can be configured to set specific paths within Datasette to proxy content from another URL.\n\nConfigure the plugin like this:\n```json\n{\n    \"plugins\": {\n        \"datasette-proxy-url\": {\n            \"paths\": [\n                {\"path\": \"/proxy\", \"backend\": \"http://example.com/\"},\n            ]\n        }\n    }\n}\n```\nNow any request to `/proxy` will serve the HTML content from `http://example.com/`.\n\nThe `content-type` response header and the content body will be passed through. All other headers are currently ignored.\n\n## Development\n\nTo set up this plugin locally, first checkout the code. Then create a new virtual environment:\n```bash\ncd datasette-proxy-url\npython3 -m venv venv\nsource venv/bin/activate\n```\nNow install the dependencies and test dependencies:\n```bash\npip install -e '.[test]'\n```\nTo run the tests:\n```bash\npytest\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Proxy a URL through a Datasette instance",
    "version": "0.1.1",
    "project_urls": {
        "CI": "https://github.com/datasette/datasette-proxy-url/actions",
        "Changelog": "https://github.com/datasette/datasette-proxy-url/releases",
        "Homepage": "https://github.com/datasette/datasette-proxy-url",
        "Issues": "https://github.com/datasette/datasette-proxy-url/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9ab0ecbf45279a5649f51bf41bc8b52463f492b4e822c36cab8097883ae21d0b",
                "md5": "0195810bc67109320070d6330108067f",
                "sha256": "cecc4091538975a25d634cb7efc47cd7125f2547d23ec85339aa2eac596ea706"
            },
            "downloads": -1,
            "filename": "datasette_proxy_url-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0195810bc67109320070d6330108067f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6895,
            "upload_time": "2024-01-23T20:35:53",
            "upload_time_iso_8601": "2024-01-23T20:35:53.956339Z",
            "url": "https://files.pythonhosted.org/packages/9a/b0/ecbf45279a5649f51bf41bc8b52463f492b4e822c36cab8097883ae21d0b/datasette_proxy_url-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3d2e6efa198f7cdab54d4ecefb49f3eac6d478d491d0027f245757282d21a177",
                "md5": "9a6778e6bd2871db56c0faf0f7c016e5",
                "sha256": "017ef6425282562cef4db154e8e8d0c7db1ae030fbc1b40e04884c2d29de33d0"
            },
            "downloads": -1,
            "filename": "datasette-proxy-url-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "9a6778e6bd2871db56c0faf0f7c016e5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 6732,
            "upload_time": "2024-01-23T20:35:55",
            "upload_time_iso_8601": "2024-01-23T20:35:55.278774Z",
            "url": "https://files.pythonhosted.org/packages/3d/2e/6efa198f7cdab54d4ecefb49f3eac6d478d491d0027f245757282d21a177/datasette-proxy-url-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-23 20:35:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "datasette",
    "github_project": "datasette-proxy-url",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "datasette-proxy-url"
}
        
Elapsed time: 0.15966s