Skip to main content

Datasette plugin for publishing data using Vercel

Project description

datasette-publish-now

PyPI CircleCI License

Datasette plugin for publishing data using Vercel.

Installation

Install this plugin in the same environment as Datasette.

$ pip install datasette-publish-now

Usage

First, install the Vercel CLI tool by following their instructions.

Run now login to login to (or create) an account.

Now you can use datasette publish now to publish your data:

datasette publish now my-database.db --project=my-database

The --project argument is required - it specifies the project name that should be used for your deployment. This will be used as part of the deployment's URL.

Other options

  • --no-prod deploys to the project without updating the "production" URL alias to point to that new deployment. Without that option all deploys go directly to production.
  • --debug enables the Now CLI debug output
  • --token allows you to pass a Now authentication token, rather than needing to first run now login to configure the tool
  • --public runs now --public to publish the application source code at /_src e.g. https://datasette-public.now.sh/_src and make recent logs visible at /_logs e.g. https://datasette-public.now.sh/_logs
  • --generate-dir - by default this tool generates a new Now app in a temporary directory, deploys it and then deletes the directory. Use --generate-dir=my-app to output the generated application files to a new directory of your choice instead. You can then deploy it by running now in that directory.

Full help

Warning: Some of these options are not yet implemented by this plugin. In particular, the following do not yet work:

  • --extra-options
  • --static
  • --plugin-secret
  • --version-note
$ datasette publish now --help

Usage: datasette publish now [OPTIONS] [FILES]...

Options:
  -m, --metadata FILENAME         Path to JSON/YAML file containing metadata to publish
  --extra-options TEXT            Extra options to pass to datasette serve
  --branch TEXT                   Install datasette from a GitHub branch e.g. master
  --template-dir DIRECTORY        Path to directory containing custom templates
  --plugins-dir DIRECTORY         Path to directory containing custom plugins
  --static MOUNT:DIRECTORY        Serve static files from this directory at /MOUNT/...
  --install TEXT                  Additional packages (e.g. plugins) to install
  --plugin-secret <TEXT TEXT TEXT>...
                                  Secrets to pass to plugins, e.g. --plugin-secret
                                  datasette-auth-github client_id xxx

  --version-note TEXT             Additional note to show on /-/versions
  --secret TEXT                   Secret used for signing secure values, such as signed
                                  cookies

  --title TEXT                    Title for metadata
  --license TEXT                  License label for metadata
  --license_url TEXT              License URL for metadata
  --source TEXT                   Source label for metadata
  --source_url TEXT               Source URL for metadata
  --about TEXT                    About label for metadata
  --about_url TEXT                About URL for metadata
  --token TEXT                    Auth token to use for deploy
  --project PROJECT               Vercel project name to use  [required]
  --no-prod                       Don't deploy directly to production
  --debug                         Enable Now CLI debug output
  --public                        Publish source with Now CLI --public
  --generate-dir DIRECTORY        Output generated application files here
  --help                          Show this message and exit.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datasette_publish_now-0.6-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file datasette_publish_now-0.6-py3-none-any.whl.

File metadata

  • Download URL: datasette_publish_now-0.6-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.10

File hashes

Hashes for datasette_publish_now-0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e330ba98770d3ec07fbd1787a0ce257c16a0c442aebac5b40ffcceee50a4d966
MD5 9e0ec7bcba34c7c1020205d18886ca4e
BLAKE2b-256 b93a2ee0fc28b68c9619b4b7ec21b2f871bc9710994bb8f1e8db89f133abe77b

See more details on using hashes here.

Supported by

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