Skip to content

Commit 678e5e8

Browse files
committed
update README
1 parent 2ddfecf commit 678e5e8

File tree

16 files changed

+81
-127
lines changed

16 files changed

+81
-127
lines changed

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ PROJECT_NAME = "pyEchoNext"
4848
# could be handy for archiving the generated documentation or if some version
4949
# control system is used.
5050

51-
PROJECT_NUMBER = "0.6.10"
51+
PROJECT_NUMBER = "0.6.11"
5252

5353
# Using the PROJECT_BRIEF tag one can provide an optional one line description
5454
# for a project that appears at the top of each page and should give viewer a

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,13 @@
3939
4040
Welcome to **EchoNext**, where innovation meets simplicity! Are you tired of the sluggishness of traditional web frameworks? Want a solution that keeps pace with your ambitious apps? Look no further. EchoNext is your agile companion in the world of web development!
4141

42+
<p align="center">
43+
<img src="https://raw.githubusercontent.com/alexeev-prog/pyEchoNext/refs/heads/main/docs/logo.jpg" width='600px' height='600px'>
44+
</p>
45+
4246
**Imagine** a lightweight framework that empowers you to create modern web applications with lightning speed and flexibility. With EchoNext, you're not just coding; you're building a masterpiece!
4347

44-
> Last stable version: 0.6.10 alpha
48+
> Last stable version: 0.6.11 alpha
4549
4650
> Next Big Update: ASYNC & unicorn support
4751
@@ -758,6 +762,13 @@ class IndexView(View):
758762
return Response(request, body="Message has accepted!")
759763
```
760764

765+
## Tests coverage
766+
To test the web framework, PyTest with the pytest-cov plugin is used. You can look at the tests in [tests directory](./tests)
767+
768+
| Statements | Miss | Coverage |
769+
|------------|------------|----------|
770+
| 1327 | 997 | 28% |
771+
761772
## Documentation 🌍
762773
Extended documentation and framework specifications are available at the following links:
763774

SECURITY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ currently being supported with security updates.
77

88
| Version | Supported |
99
| ------- | ------------------ |
10+
| 0.6.11 | :white_check_mark: |
1011
| 0.6.10 | :white_check_mark: |
1112
| 0.6.9 | :white_check_mark: |
1213
| 0.5.9 | :white_check_mark: |

docs/logo.jpg

2 MB
Loading

examples/example_module.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import os
22

33
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
4-
TEMPLATES_DIR = 'templates'
5-
SECRET_KEY = 'secret-key'
6-
LOCALE = 'DEFAULT'
4+
TEMPLATES_DIR = "templates"
5+
SECRET_KEY = "secret-key"
6+
LOCALE = "DEFAULT"
77
LOCALE_DIR = None
8-
VERSION = '0.1.0'
9-
DESCRIPTION = 'Example echonext webapp'
10-
STATIC_DIR = 'static'
8+
VERSION = "0.1.0"
9+
DESCRIPTION = "Example echonext webapp"
10+
STATIC_DIR = "static"

pyechonext/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from rich import print
2323
from rich.traceback import install
2424

25-
__version__ = "0.6.9"
25+
__version__ = "0.6.11"
2626
install(show_locals=True)
2727

2828

pyechonext/apidoc_ui/ui.py

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ def __init__(self, specification: dict):
1010
"""
1111
Constructs a new instance.
1212
13-
:param specification: The specification
14-
:type specification: dict
13+
:param specification: The specification
14+
:type specification: dict
1515
"""
1616
self.specification = specification
1717

@@ -27,19 +27,19 @@ def generate_section(
2727
"""
2828
generate section
2929
30-
:param route: The route
31-
:type route: str
32-
:param summary_get: The summary get
33-
:type summary_get: str
34-
:param summary_post: The summary post
35-
:type summary_post: str
36-
:param get_responses: The get responses
37-
:type get_responses: dict
38-
:param post_responses: The post responses
39-
:type post_responses: dict
30+
:param route: The route
31+
:type route: str
32+
:param summary_get: The summary get
33+
:type summary_get: str
34+
:param summary_post: The summary post
35+
:type summary_post: str
36+
:param get_responses: The get responses
37+
:type get_responses: dict
38+
:param post_responses: The post responses
39+
:type post_responses: dict
4040
41-
:returns: template section
42-
:rtype: str
41+
:returns: template section
42+
:rtype: str
4343
"""
4444

4545
template = f"""
@@ -77,8 +77,8 @@ def generate_html_page(self) -> str:
7777
"""
7878
Generate html page template
7979
80-
:returns: template
81-
:rtype: str
80+
:returns: template
81+
:rtype: str
8282
"""
8383
template = """
8484
<!DOCTYPE html>
@@ -114,11 +114,11 @@ def generate_html_page(self) -> str:
114114
font-family: monospace;
115115
margin: 10px;
116116
padding: 10px;
117-
white-space: pre-wrap; /* Since CSS 2.1 */
118-
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
119-
white-space: -pre-wrap; /* Opera 4-6 */
120-
white-space: -o-pre-wrap; /* Opera 7 */
121-
word-wrap: break-word; /* Internet Explorer 5.5+ */
117+
white-space: pre-wrap; /* Since CSS 2.1 */
118+
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
119+
white-space: -pre-wrap; /* Opera 4-6 */
120+
white-space: -o-pre-wrap; /* Opera 7 */
121+
word-wrap: break-word; /* Internet Explorer 5.5+ */
122122
}
123123
code{
124124
border-radius: 5px;
@@ -208,17 +208,17 @@ def generate_html_page(self) -> str:
208208
Atom One Light by Daniel Gamage
209209
Original One Light Syntax theme from https://github.com/atom/one-light-syntax
210210
211-
base: #fafafa
212-
mono-1: #383a42
213-
mono-2: #686b77
214-
mono-3: #a0a1a7
215-
hue-1: #0184bb
216-
hue-2: #4078f2
217-
hue-3: #a626a4
218-
hue-4: #50a14f
219-
hue-5: #e45649
211+
base: #fafafa
212+
mono-1: #383a42
213+
mono-2: #686b77
214+
mono-3: #a0a1a7
215+
hue-1: #0184bb
216+
hue-2: #4078f2
217+
hue-3: #a626a4
218+
hue-4: #50a14f
219+
hue-5: #e45649
220220
hue-5-2: #c91243
221-
hue-6: #986801
221+
hue-6: #986801
222222
hue-6-2: #c18401
223223
224224
*/

pyechonext/app.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99

1010
from pyechonext.cache import InMemoryCache
1111
from pyechonext.config import Settings
12-
from pyechonext.i18n_l10n.i18n import JSONi18nLoader
13-
from pyechonext.i18n_l10n.l10n import JSONLocalizationLoader
12+
from pyechonext.i18n_l10n import JSONi18nLoader, JSONLocalizationLoader
1413
from pyechonext.logging import setup_logger
1514
from pyechonext.middleware import BaseMiddleware
1615
from pyechonext.request import Request

pyechonext/i18n_l10n/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from pyechonext.i18n_l10n.i18n import JSONi18nLoader, LanguageManager
2+
from pyechonext.i18n_l10n.l10n import JSONLocalizationLoader
3+
4+
all = [JSONi18nLoader, LanguageManager, JSONLocalizationLoader]

pyechonext/i18n_l10n/i18n.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class JSONi18nLoader(i18nInterface):
5252
"description": "This web application is an example of the pyEchonext web framework.",
5353
}
5454

55-
def __init__(self, locale: str, directory: str):
55+
def __init__(self, locale: str = "DEFAULT", directory: str = None):
5656
"""
5757
Constructs a new instance.
5858
@@ -135,7 +135,7 @@ def __init__(self, loader: i18nInterface):
135135
"""
136136
self.loader = loader
137137

138-
def translate(self, key: str) -> str:
138+
def translate(self, key: str, **kwargs) -> str:
139139
"""
140140
Translate
141141
@@ -145,4 +145,4 @@ def translate(self, key: str) -> str:
145145
:returns: translated string
146146
:rtype: str
147147
"""
148-
return self.loader.get_string(key)
148+
return self.loader.get_string(key, **kwargs)

0 commit comments

Comments
 (0)