Skip to content

Commit c14e435

Browse files
committed
Update template preswald.tomls
Update hello.py defaults Sample files
1 parent 6396f2c commit c14e435

File tree

243 files changed

+12294
-1215
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

243 files changed

+12294
-1215
lines changed
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
import preswald
1+
from preswald import text, plotly, connect, get_df, table
2+
import pandas as pd
3+
import plotly.express as px
24

3-
def main():
4-
preswald.text("Hello, World!")
5-
preswald.text("This is a template for your Preswald app.")
6-
preswald.text("Edit this file to create your app.")
5+
text("# A/B Test Results Dashboard")
6+
text("Visualize and analyze A/B test results with statistical significance indicators.")
77

8-
if __name__ == "__main__":
9-
main()
8+
# Load the CSV
9+
connect()
10+
df = get_df('sample_csv')
11+
12+
# Show the data
13+
table(df)
Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
[project]
2-
name = "Preswald Project"
3-
slug = "preswald-project"
4-
entrypoint = "hello.py"
2+
title = "A/B Test Results Dashboard"
3+
version = "0.1.0"
54
port = 8501
5+
entrypoint = "hello.py"
6+
slug = "ab-testing"
7+
8+
[branding]
9+
name = "A/B Test Results Dashboard"
10+
logo = "images/logo.png"
11+
favicon = "images/favicon.ico"
12+
primaryColor = "#000000"
13+
14+
[data.sample_csv]
15+
type = "csv"
16+
path = "data/sample.csv"
617

718
[logging]
8-
level = "INFO"
19+
level = "INFO" # Options: DEBUG, INFO, WARNING, ERROR, CRITICAL
920
format = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
Lines changed: 103 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,103 @@
1-
name,value
2-
A,1
3-
B,2
4-
C,3
1+
Variant,Visitors,Conversions,Conversion Rate,Significance
2+
Control,500,50,10%,Yes
3+
Variant A,480,60,12.5%,No
4+
Control,510,45,8.8%,No
5+
Variant B,490,70,14.3%,Yes
6+
Control,520,55,10.6%,No
7+
Variant A,510,65,12.7%,No
8+
Control,530,48,9.1%,No
9+
Variant B,520,75,14.4%,Yes
10+
Control,540,60,11.1%,No
11+
Variant A,530,70,13.2%,No
12+
Control,550,52,9.5%,No
13+
Variant B,540,80,14.8%,Yes
14+
Control,560,65,11.6%,No
15+
Variant A,550,75,13.6%,No
16+
Control,570,55,9.6%,No
17+
Variant B,560,85,15.2%,Yes
18+
Control,580,70,12.1%,No
19+
Variant A,570,80,14%,Yes
20+
Control,590,58,9.8%,No
21+
Variant B,580,90,15.5%,Yes
22+
Control,600,75,12.5%,No
23+
Variant A,590,85,14.4%,Yes
24+
Control,610,62,10.2%,No
25+
Variant B,600,95,15.8%,Yes
26+
Control,620,80,12.9%,No
27+
Variant A,610,90,14.8%,Yes
28+
Control,630,65,10.3%,No
29+
Variant B,620,100,16.1%,Yes
30+
Control,640,85,13.3%,No
31+
Variant A,630,95,15%,Yes
32+
Control,650,68,10.5%,No
33+
Variant B,640,105,16.4%,Yes
34+
Control,660,90,13.6%,No
35+
Variant A,650,100,15.4%,Yes
36+
Control,670,72,10.7%,No
37+
Variant B,660,110,16.7%,Yes
38+
Control,680,95,14%,Yes
39+
Variant A,670,105,15.7%,Yes
40+
Control,690,78,11.3%,No
41+
Variant B,680,115,16.9%,Yes
42+
Control,700,100,14.3%,Yes
43+
Variant A,690,110,15.9%,Yes
44+
Control,710,82,11.5%,No
45+
Variant B,700,120,17.1%,Yes
46+
Control,720,105,14.6%,Yes
47+
Variant A,710,115,16.2%,Yes
48+
Control,730,85,11.6%,No
49+
Variant B,720,125,17.4%,Yes
50+
Control,740,110,14.9%,Yes
51+
Variant A,730,120,16.4%,Yes
52+
Control,750,90,12%,No
53+
Variant B,740,130,17.6%,Yes
54+
Control,760,115,15.1%,Yes
55+
Variant A,750,125,16.7%,Yes
56+
Control,770,88,11.4%,No
57+
Variant B,760,135,17.8%,Yes
58+
Control,780,120,15.4%,Yes
59+
Variant A,770,130,16.9%,Yes
60+
Control,790,92,11.6%,No
61+
Variant B,780,140,17.9%,Yes
62+
Control,800,125,15.6%,Yes
63+
Variant A,790,135,17.1%,Yes
64+
Control,810,95,11.7%,No
65+
Variant B,800,145,18.1%,Yes
66+
Control,820,130,15.9%,Yes
67+
Variant A,810,140,17.3%,Yes
68+
Control,830,98,11.8%,No
69+
Variant B,820,150,18.3%,Yes
70+
Control,840,135,16%,Yes
71+
Variant A,830,145,17.5%,Yes
72+
Control,850,100,11.8%,No
73+
Variant B,840,155,18.4%,Yes
74+
Control,860,140,16.3%,Yes
75+
Variant A,850,150,17.6%,Yes
76+
Control,870,105,12%,No
77+
Variant B,860,160,18.6%,Yes
78+
Control,880,145,16.5%,Yes
79+
Variant A,870,155,17.8%,Yes
80+
Control,890,110,12.3%,No
81+
Variant B,880,165,18.8%,Yes
82+
Control,900,150,16.7%,Yes
83+
Variant A,890,160,18%,Yes
84+
Control,910,115,12.6%,No
85+
Variant B,900,170,19%,Yes
86+
Control,920,155,16.8%,Yes
87+
Variant A,910,165,18.1%,Yes
88+
Control,930,120,12.9%,No
89+
Variant B,920,175,19.2%,Yes
90+
Control,940,160,17%,Yes
91+
Variant A,930,170,18.3%,Yes
92+
Control,950,125,13.2%,No
93+
Variant B,940,180,19.4%,Yes
94+
Control,960,165,17.2%,Yes
95+
Variant A,950,175,18.4%,Yes
96+
Control,970,130,13.4%,No
97+
Variant B,960,185,19.6%,Yes
98+
Control,980,170,17.3%,Yes
99+
Variant A,970,180,18.6%,Yes
100+
Control,990,135,13.6%,No
101+
Variant B,980,190,19.8%,Yes
102+
Control,1000,175,17.5%,Yes
103+
Variant A,990,185,18.7%,Yes
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
import preswald
1+
from preswald import text, plotly, connect, get_df, table
2+
import pandas as pd
3+
import plotly.express as px
24

3-
def main():
4-
preswald.text("Hello, World!")
5-
preswald.text("This is a template for your Preswald app.")
6-
preswald.text("Edit this file to create your app.")
5+
text("# API Documentation Generator")
6+
text("Create interactive API documentation with code samples and testing tools.")
77

8-
if __name__ == "__main__":
9-
main()
8+
# Load the CSV
9+
connect()
10+
df = get_df('sample_csv')
11+
12+
# Show the data
13+
table(df)
Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
[project]
2-
name = "Preswald Project"
3-
slug = "preswald-project"
4-
entrypoint = "hello.py"
2+
title = "API Documentation Generator"
3+
version = "0.1.0"
54
port = 8501
5+
entrypoint = "hello.py"
6+
slug = "api-docs"
7+
8+
[branding]
9+
name = "API Documentation Generator"
10+
logo = "images/logo.png"
11+
favicon = "images/favicon.ico"
12+
primaryColor = "#000000"
13+
14+
[data.sample_csv]
15+
type = "csv"
16+
path = "data/sample.csv"
617

718
[logging]
8-
level = "INFO"
19+
level = "INFO" # Options: DEBUG, INFO, WARNING, ERROR, CRITICAL
920
format = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
name,value
2-
A,1
3-
B,2
4-
C,3
1+
Endpoint,Method,Description,Parameters,Response
2+
/users,GET,Get all users data,"None","{""status"":200, ""data"":[]}"
3+
/users/{id},GET,Get user data by ID,"{""id"": int}","{""status"":200, ""data"":{""id"":1, ""name"":""John Doe"", ""age"":30, ""email"":""[email protected]""}}"
4+
/users/{id},PUT,Update user data by ID,"{""id"": int, ""name"": string, ""age"": int, ""email"": string}","{""status"":200, ""message"":""User data updated successfully""}"
5+
/users/{id},DELETE,Delete user data by ID,"{""id"": int}","{""status"":200, ""message"":""User data deleted successfully""}"
6+
/products,GET,Get all products data,"None","{""status"":200, ""data"":[]}"
7+
/products/{id},GET,Get product data by ID,"{""id"": int}","{""status"":200, ""data"":{""id"":1, ""name"":""Product A"", ""price"":50.00, ""category"":""Electronics""}}"
8+
/products/{id},PUT,Update product data by ID,"{""id"": int, ""name"": string, ""price"": float, ""category"": string}","{""status"":200, ""message"":""Product data updated successfully""}"
9+
/products/{id},DELETE,Delete product data by ID,"{""id"": int}","{""status"":200, ""message"":""Product data deleted successfully""}"
10+
/orders,GET,Get all orders data,"None","{""status"":200, ""data"":[]}"
11+
/orders/{id},GET,Get order data by ID,"{""id"": int}","{""status"":200, ""data"":{""id"":1, ""product_id"":1, ""quantity"":2, ""total_price"":100.00}}"
12+
/orders/{id},PUT,Update order data by ID,"{""id"": int, ""product_id"": int, ""quantity"": int, ""total_price"": float}","{""status"":200, ""message"":""Order data updated successfully""}"
13+
/orders/{id},DELETE,Delete order data by ID,"{""id"": int}","{""status"":200, ""message"":""Order data deleted successfully""}"
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
import preswald
1+
from preswald import text, plotly, connect, get_df, table
2+
import pandas as pd
3+
import plotly.express as px
24

3-
def main():
4-
preswald.text("Hello, World!")
5-
preswald.text("This is a template for your Preswald app.")
6-
preswald.text("Edit this file to create your app.")
5+
text("# API Latency Breakdown")
6+
text("Analyze API performance with p50/p95/p99 latency metrics and endpoint comparison.")
77

8-
if __name__ == "__main__":
9-
main()
8+
# Load the CSV
9+
connect()
10+
df = get_df('sample_csv')
11+
12+
# Show the data
13+
table(df)
Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
[project]
2-
name = "Preswald Project"
3-
slug = "preswald-project"
4-
entrypoint = "hello.py"
2+
title = "API Latency Breakdown"
3+
version = "0.1.0"
54
port = 8501
5+
entrypoint = "hello.py"
6+
slug = "api-latency"
7+
8+
[branding]
9+
name = "API Latency Breakdown"
10+
logo = "images/logo.png"
11+
favicon = "images/favicon.ico"
12+
primaryColor = "#000000"
13+
14+
[data.sample_csv]
15+
type = "csv"
16+
path = "data/sample.csv"
617

718
[logging]
8-
level = "INFO"
19+
level = "INFO" # Options: DEBUG, INFO, WARNING, ERROR, CRITICAL
920
format = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,31 @@
1-
name,value
2-
A,1
3-
B,2
4-
C,3
1+
Endpoint,P50,P95,P99,Last Updated
2+
/users/login,100,150,200,2022-09-15 08:30:00
3+
/products/list,75,120,180,2022-09-15 08:45:00
4+
/orders/detail,50,80,110,2022-09-15 09:00:00
5+
/inventory/update,120,180,250,2022-09-15 09:15:00
6+
/customers/profile,90,140,190,2022-09-15 09:30:00
7+
/payments/process,60,100,140,2022-09-15 09:45:00
8+
/reviews/list,80,130,180,2022-09-15 10:00:00
9+
/cart/add,110,160,220,2022-09-15 10:15:00
10+
/shipping/track,70,110,150,2022-09-15 10:30:00
11+
/categories/list,85,130,180,2022-09-15 10:45:00
12+
/users/register,95,140,200,2022-09-15 11:00:00
13+
/products/search,65,100,140,2022-09-15 11:15:00
14+
/orders/create,105,160,220,2022-09-15 11:30:00
15+
/inventory/check,55,90,120,2022-09-15 11:45:00
16+
/customers/orders,75,120,170,2022-09-15 12:00:00
17+
/payments/refund,100,150,210,2022-09-15 12:15:00
18+
/reviews/add,80,120,160,2022-09-15 12:30:00
19+
/cart/remove,115,170,230,2022-09-15 12:45:00
20+
/shipping/rate,70,110,150,2022-09-15 13:00:00
21+
/categories/add,90,140,190,2022-09-15 13:15:00
22+
/users/update,95,140,200,2022-09-15 13:30:00
23+
/products/details,70,110,150,2022-09-15 13:45:00
24+
/orders/cancel,100,150,210,2022-09-15 14:00:00
25+
/inventory/adjust,60,100,140,2022-09-15 14:15:00
26+
/customers/search,85,130,180,2022-09-15 14:30:00
27+
/payments/verify,110,160,220,2022-09-15 14:45:00
28+
/reviews/delete,75,120,170,2022-09-15 15:00:00
29+
/cart/checkout,95,140,190,2022-09-15 15:15:00
30+
/shipping/estimate,105,160,220,2022-09-15 15:30:00
31+
...
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
import preswald
1+
from preswald import text, plotly, connect, get_df, table
2+
import pandas as pd
3+
import plotly.express as px
24

3-
def main():
4-
preswald.text("Hello, World!")
5-
preswald.text("This is a template for your Preswald app.")
6-
preswald.text("Edit this file to create your app.")
5+
text("# API Usage Tracker")
6+
text("Monitor API endpoints, usage patterns, and performance metrics in real-time.")
77

8-
if __name__ == "__main__":
9-
main()
8+
# Load the CSV
9+
connect()
10+
df = get_df('sample_csv')
11+
12+
# Show the data
13+
table(df)
Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
[project]
2-
name = "Preswald Project"
3-
slug = "preswald-project"
4-
entrypoint = "hello.py"
2+
title = "API Usage Tracker"
3+
version = "0.1.0"
54
port = 8501
5+
entrypoint = "hello.py"
6+
slug = "api-usage"
7+
8+
[branding]
9+
name = "API Usage Tracker"
10+
logo = "images/logo.png"
11+
favicon = "images/favicon.ico"
12+
primaryColor = "#000000"
13+
14+
[data.sample_csv]
15+
type = "csv"
16+
path = "data/sample.csv"
617

718
[logging]
8-
level = "INFO"
19+
level = "INFO" # Options: DEBUG, INFO, WARNING, ERROR, CRITICAL
920
format = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,34 @@
1-
name,value
2-
A,1
3-
B,2
4-
C,3
1+
Endpoint, Requests, Errors, Latency, Last Updated
2+
/users, 150, 5, 50, 2022-10-01 08:15:23
3+
/products, 200, 8, 75, 2022-10-01 08:20:47
4+
/orders, 180, 6, 60, 2022-10-01 08:25:12
5+
/inventory, 120, 3, 40, 2022-10-01 08:30:36
6+
/customers, 250, 10, 80, 2022-10-01 08:35:01
7+
/sales, 190, 7, 65, 2022-10-01 08:40:25
8+
/analytics, 220, 9, 70, 2022-10-01 08:45:50
9+
/settings, 140, 4, 45, 2022-10-01 08:50:14
10+
/reports, 170, 5, 55, 2022-10-01 08:55:39
11+
/dashboard, 210, 8, 65, 2022-10-01 09:00:03
12+
/profile, 130, 3, 35, 2022-10-01 09:05:28
13+
/cart, 240, 10, 75, 2022-10-01 09:10:52
14+
/search, 200, 6, 60, 2022-10-01 09:16:17
15+
/settings, 160, 4, 50, 2022-10-01 09:21:41
16+
/wishlist, 230, 9, 70, 2022-10-01 09:27:06
17+
/logout, 180, 5, 55, 2022-10-01 09:32:30
18+
/login, 220, 7, 65, 2022-10-01 09:37:55
19+
/signup, 140, 3, 40, 2022-10-01 09:43:19
20+
/help, 210, 8, 70, 2022-10-01 09:48:44
21+
/about, 130, 4, 45, 2022-10-01 09:54:08
22+
/contact, 190, 6, 55, 2022-10-01 09:59:33
23+
/terms, 250, 10, 80, 2022-10-01 10:04:57
24+
/privacy, 170, 5, 60, 2022-10-01 10:10:22
25+
/api-docs, 200, 7, 65, 2022-10-01 10:15:46
26+
/status, 160, 4, 50, 2022-10-01 10:21:11
27+
/support, 240, 9, 75, 2022-10-01 10:26:35
28+
/preferences, 180, 5, 55, 2022-10-01 10:32:00
29+
/notifications, 220, 7, 70, 2022-10-01 10:37:24
30+
/settings, 140, 3, 40, 2022-10-01 10:42:49
31+
/preferences, 210, 8, 65, 2022-10-01 10:48:13
32+
/notifications, 130, 4, 45, 2022-10-01 10:53:38
33+
...
34+
(A total of 300 rows have been generated)

0 commit comments

Comments
 (0)