mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-03-03 17:37:06 +01:00
Updated example extension
This commit is contained in:
parent
31b1c0d1d5
commit
503c981bc9
3 changed files with 24 additions and 2 deletions
|
@ -0,0 +1,11 @@
|
||||||
|
#async def m001_initial(db):
|
||||||
|
|
||||||
|
# await db.execute(
|
||||||
|
# """
|
||||||
|
# CREATE TABLE IF NOT EXISTS example (
|
||||||
|
# id TEXT PRIMARY KEY,
|
||||||
|
# wallet TEXT NOT NULL,
|
||||||
|
# time TIMESTAMP NOT NULL DEFAULT (strftime('%s', 'now'))
|
||||||
|
# );
|
||||||
|
# """
|
||||||
|
# )
|
11
lnbits/extensions/example/models.py
Normal file
11
lnbits/extensions/example/models.py
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#from sqlite3 import Row
|
||||||
|
#from typing import NamedTuple
|
||||||
|
|
||||||
|
|
||||||
|
#class Example(NamedTuple):
|
||||||
|
# id: str
|
||||||
|
# wallet: str
|
||||||
|
#
|
||||||
|
# @classmethod
|
||||||
|
# def from_row(cls, row: Row) -> "Example":
|
||||||
|
# return cls(**dict(row))
|
|
@ -21,8 +21,8 @@ async def api_example():
|
||||||
"""Try to add descriptions for others."""
|
"""Try to add descriptions for others."""
|
||||||
tools = [
|
tools = [
|
||||||
{
|
{
|
||||||
"name": "Flask",
|
"name": "Quart",
|
||||||
"url": "https://flask.palletsprojects.com/",
|
"url": "https://pgjones.gitlab.io/quart/",
|
||||||
"language": "Python",
|
"language": "Python",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue