Просмотр исходного кода

renaming from nice_gui to nicegui

Rodja Trappe 4 лет назад
Родитель
Сommit
722462189c

+ 2 - 2
README.md

@@ -17,7 +17,7 @@ We like [Streamlit](https://streamlit.io/) but find it does to much magic when i
 Write your nice GUI in a file `main.py`:
 
 ```python
-from nice_gui import ui
+from nicegui import ui
 
 ui.label('Hello NiceGUI!')
 ui.button('BUTTON', on_click: lambda: print('button was pressed'))
@@ -33,7 +33,7 @@ Note: The script will automatically reload the GUI if you modify your code.
 
 ## API
 
-See [main.py](https://github.com/zauberzeug/nice_gui/blob/main/main.py) for an example of all API calls you can make with NiceGUI.
+See [main.py](/main.py) for an example of all API calls you can make with NiceGUI.
 
 ## Plots
 

+ 1 - 1
main.py

@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-from nice_gui import ui
+from nicegui import ui
 from datetime import datetime
 from matplotlib import pyplot as plt
 import numpy as np

+ 0 - 1
nice_gui/__init__.py

@@ -1 +0,0 @@
-from nice_gui.nice_gui import app, ui

+ 1 - 0
nicegui/__init__.py

@@ -0,0 +1 @@
+from nicegui.nicegui import app, ui

+ 0 - 0
nice_gui/elements/button.py → nicegui/elements/button.py


+ 0 - 0
nice_gui/elements/card.py → nicegui/elements/card.py


+ 0 - 0
nice_gui/elements/checkbox.py → nicegui/elements/checkbox.py


+ 0 - 0
nice_gui/elements/column.py → nicegui/elements/column.py


+ 0 - 0
nice_gui/elements/element.py → nicegui/elements/element.py


+ 0 - 0
nice_gui/elements/group.py → nicegui/elements/group.py


+ 0 - 0
nice_gui/elements/icon.py → nicegui/elements/icon.py


+ 0 - 0
nice_gui/elements/input.py → nicegui/elements/input.py


+ 0 - 0
nice_gui/elements/label.py → nicegui/elements/label.py


+ 0 - 0
nice_gui/elements/line_plot.py → nicegui/elements/line_plot.py


+ 0 - 0
nice_gui/elements/link.py → nicegui/elements/link.py


+ 1 - 1
nice_gui/elements/plot.py → nicegui/elements/plot.py

@@ -1,4 +1,4 @@
-from nice_gui.elements.element import Element
+from nicegui.elements.element import Element
 import justpy as jp
 import matplotlib.pyplot as plt
 from .element import Element

+ 0 - 0
nice_gui/elements/radio.py → nicegui/elements/radio.py


+ 0 - 0
nice_gui/elements/row.py → nicegui/elements/row.py


+ 0 - 0
nice_gui/elements/select.py → nicegui/elements/select.py


+ 0 - 0
nice_gui/elements/slider.py → nicegui/elements/slider.py


+ 0 - 0
nice_gui/elements/switch.py → nicegui/elements/switch.py


+ 0 - 0
nice_gui/favicon.png → nicegui/favicon.png


+ 1 - 1
nice_gui/nice_gui.py → nicegui/nicegui.py

@@ -11,7 +11,7 @@ from .elements.element import Element
 # start uvicorn with auto-reload; afterwards the auto-reloaded process should not start uvicorn again
 if not inspect.stack()[-2].filename.endswith('spawn.py'):
     webbrowser.open('http://localhost/')
-    uvicorn.run('nice_gui:app', host='0.0.0.0', port=80, lifespan='on', reload=True)
+    uvicorn.run('nicegui:app', host='0.0.0.0', port=80, lifespan='on', reload=True)
     sys.exit()
 
 wp = jp.QuasarPage(delete_flag=False, title='NiceGUI', favicon='favicon.png')

+ 0 - 0
nice_gui/timer.py → nicegui/timer.py


+ 0 - 0
nice_gui/ui.py → nicegui/ui.py


+ 0 - 0
nice_gui/utils.py → nicegui/utils.py


+ 1 - 1
pyproject.toml

@@ -1,5 +1,5 @@
 [tool.poetry]
-name = "nice_gui"
+name = "nicegui"
 version = "0.1.0"
 description = "High-Level Abstraction Web-GUI Using Just Python"
 authors = ["Zauberzeug GmbH"]

+ 2 - 2
setup.py

@@ -4,8 +4,8 @@ setup(
     name='NiceGUI',
     version='0.1',
     description='A nice GUI framework',
-    url='https://github.com/zauberzeug/nice_gui/',
+    url='https://github.com/zauberzeug/nicegui/',
     author='Zauberzeug',
     author_email='info@zauberzeug.com',
-    packages=['nice_gui']
+    packages=['nicegui']
 )

+ 1 - 1
spike_classes/main.py

@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-from nice_gui import ui
+from nicegui import ui
 
 ui.label('Hello world!')
 ui.button('Click me')

+ 1 - 1
spike_classes/nice_gui.py

@@ -8,7 +8,7 @@ from timer import Timer
 from elements.element import Element
 
 if not inspect.stack()[-2].filename.endswith('spawn.py'):
-    uvicorn.run('nice_gui:app', host='0.0.0.0', port=80, lifespan='on', reload=True)
+    uvicorn.run('nicegui:app', host='0.0.0.0', port=80, lifespan='on', reload=True)
     sys.exit()
 
 wp = jp.QuasarPage(delete_flag=False, head_html='<script>confirm = () => true;</script>')

+ 1 - 1
spike_reload/main.py

@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-from nice_gui import ui, pad
+from nicegui import ui, pad
 
 print(pad, __name__, "MAIN: create label")
 ui.label('Hello NiceGUI!')

+ 1 - 1
spike_reload/nice_gui.py

@@ -10,7 +10,7 @@ pad = '*' * 80
 
 if not inspect.stack()[-2].filename.endswith('spawn.py'):
     print(pad, "START UVICORN")
-    uvicorn.run('nice_gui:ui', host='0.0.0.0', port=80, lifespan='on', reload=True)
+    uvicorn.run('nicegui:ui', host='0.0.0.0', port=80, lifespan='on', reload=True)
 
 wp = jp.WebPage(delete_flag=False, head_html='<script>confirm = () => true;</script>')