-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.py
More file actions
57 lines (55 loc) · 1.99 KB
/
Copy pathsettings.py
File metadata and controls
57 lines (55 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
from typing import Dict, List, Any
# When building your app, PyFyre creates HTML files based on these routes,
# so that when a user visits your website,
# the corresponding page of the route is returned.
# Once the initial page has been loaded,
# PyFyre will take over the routing as a single-page application.
#
# -> A user visits "https://your-pyfyre-app.com/about".
# -> The server returns the `about/index.html`.
# -> PyFyre takes over the page routing
# by preventing further navigation to internal links.
# -> The user clicks an internal link "https://your-pyfyre-app.com/home".
# -> PyFyre prevents the navigation and modifies the DOM
# to render the corresponding view of the route "/home".
#
# Example:
# {
# "/": {
# "title": "A PyFyre App",
# "icon": "/favicon.ico",
# "head": ['<link rel="stylesheet" href="/style.css" />']
# }
# }
ROUTES: Dict[str, Dict[str, Any]] = {
"/": {
"title": "A PyFyre App",
"icon": "/favicon.ico",
"head": ['<link rel="stylesheet" href="/style.css" />'],
},
"/playground": {
"title": "A PyFyre App | Playground",
"icon": "/favicon_code.ico",
"head": [
'<link rel="stylesheet" href="/style.css" />',
'<link rel="stylesheet" href="/codemirror.css" />',
'<script src="/codemirror.js"></script>',
'<script src="/codeeditor.js"></script>',
'<script src="/python.js"></script>',
],
},
}
# When building your app, PyFyre makes your CPython packages installed by pip
# usable for the web. Just add the name of the pip package in the list.
#
# !!! Note that it is not possible to import every CPython package
# due to Brython limitations. Read the Brython documentation:
# https://www.brython.info/static_doc/en/faq.html#:~:text=Q%20%3A%20can%20I%20import%20all%20the%20modules%20/%20packages%20that%20run%20with%20CPython%20%3F
#
# Example:
# [
# "text_generator",
# "random_string",
# "url64"
# ]
PYTHON_DEPENDENCIES: List[str] = []