Skip to content

Instantly share code, notes, and snippets.

@simonw
Last active April 24, 2024 21:58
Show Gist options
  • Save simonw/d6c3500ea0c77499034df6b4e409e3e3 to your computer and use it in GitHub Desktop.
Save simonw/d6c3500ea0c77499034df6b4e409e3e3 to your computer and use it in GitHub Desktop.
from datasette_secrets import Secret
from datasette import hookimpl
@hookimpl
def register_secrets():
return [
Secret(
name="DEMO_SECRET_ONE",
description="First demo secret",
),
Secret(
name="DEMO_SECRET_TWO",
description="Second demo secret",
obtain_url="https://www.example.com/",
obtain_label="Example",
),
Secret(
name="DEMO_SECRET_THREE",
obtain_url="https://three.example.com/",
obtain_label="Example 3",
),
]
[project]
name = "datasette-secrets-demo"
version = "0.2"
description = "Some demo secrets"
dependencies = [
"datasette-secrets"
]
[project.entry-points.datasette]
secrets_demo = "datasette_secrets_demo"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment