https://github.com/lewiscowles1986/datasette-save-as-view
Datasette plugin to save SQL as a view
https://github.com/lewiscowles1986/datasette-save-as-view
Last synced: 3 months ago
JSON representation
Datasette plugin to save SQL as a view
- Host: GitHub
- URL: https://github.com/lewiscowles1986/datasette-save-as-view
- Owner: Lewiscowles1986
- License: apache-2.0
- Created: 2023-02-25T17:12:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-26T15:00:13.000Z (over 2 years ago)
- Last Synced: 2025-03-06T14:55:03.488Z (4 months ago)
- Language: Python
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# datasette-save-as-view
[](https://pypi.org/project/datasette-save-as-view/)
[](https://github.com/simonw/datasette-save-as-view/releases)
[](https://github.com/Lewiscowles1986/datasette-save-as-view/actions?query=workflow%3ATest)
[](https://github.com/Lewiscowles1986/datasette-save-as-view/blob/main/LICENSE)Convenience for creating views when using [Datasette](https://datasette.io/).
## Installation
Install this plugin in the same environment as Datasette.
datasette install datasette-save-as-view
## Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-save-as-view
python3 -m venv .venv
. .venv/bin/activate### Testing
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
> **Warning**
> If you see errors about dependencies; I've found that deactivating and reactivating the `venv` is one way to "magically overcome" errors. Another is to write `pip freeze` to verify dependencies have actually installed.### Distributing an unpublished revision
1. In a terminal run the following command `python3 setup.py sdist`
2. This will create a .tar.gz file in the dist/ directory [relative to your plugin]
3. Installing from tarball
a. copy the full-path to the dist tar.gz file
b. run the following command `pip install datasette-save-as-view-0.1.1.tar.gz`
(_assumes 0.1.1 is your version_)