Skip to main content

A powerful multibackend GUI framework for Python. Made for declarative UI creation

Project description

Nevu UI Intro Banner

alt text

Wiki link(BETA!)

Nevu UI means: Nevu is Eleven times better Versus other UI's User Interface

Brief Description

Nevu UI is a library for the declarative creation of user interfaces in python. The project aims to provide developers with a set of ready-made, stylable, and extensible components for the rapid creation of modern and responsive interfaces in games and multimedia applications.

The main goal of Nevu UI: to make creating interfaces in python easier and faster

Key features include:

  • Layout system: Convenient arrangement of elements, for example, using grids (Grid) and scrollable containers (ScrollableColumn).
  • Set of widgets: Ready-to-use elements such as buttons, input fields, and labels.
  • Flexible styling: The ability to customize the appearance through a style system that supports colors, gradients, and borders.
  • Animations: Built-in support for animations to create dynamic and lively interfaces.
  • Declarativeness: Support for declarative interface creation

Style banner


Style - storage of parameters for customizing the appearance

Editable parameters:

  • Gradient
  • ColorTheme - Analogous to MaterialDesign, there is a ready-made set of themes - ColorThemeLibrary
  • Font name/size
  • Border Width/Radius
  • Text Align X/Y
  • Transparency

Style banner


Nevu UI allows you to describe an interface with a clear structure

Examples of declarativeness:

  • Declarative approach: Describe your interface just as you see it.
    # Specify content directly when creating the layout
    grid = ui.Grid(content={(1,1): ui.Button(...)})
    
  • Adaptive size system (SizeRules): Forget about pixels. Use relative values that adjust to the size of the window or parent element.
    • vh / vw: Percentage of the window's height/width.
    • fillx / filly / fill: Percentage of the parent layout's height/width/size.
    • gc / gcw / gch: Percentage of the grid cell size.
    • Prefix c: can be placed in any SizeRule, it means that the current value will be taken (without the prefix, the original will be taken).
  • Powerful style system: Customize every aspect of the appearance using the universal Style object.
    • Themes: Ready-made color themes in ColorThemeLibrary.
    • Gradients: Support for linear and radial.
    • Image: Support for a background image via the bgimage parameter.
    • And much more: Fonts, borders, rounding, transparency.
  • Built-in animations: Bring your interface to life with ready-made animations for movement, transparency, etc.
    • 25+ built-in animations
    • There are 2 types of animations:
      • Start - Allows you to set the initial appearance of the widget.
      • Infinite - Produces an infinite animation defined in animation_manager.
    • Usage example:
      • Start: widget.animation_manager.add_start_animation(ui.animations.EaseOut(...))
      • Infinite: widget.animation_manager.add_continuous_animation(ui.animations.EaseOut(...))

Parameter System (ParamEngine):

  • ParamEngine is a convenient tool built into all layouts and widgets, it allows you to:
    • Declaratively add variables to the object's __init__
    • Check the variable type during initialization and after
    • Integrate a parameter into different stages of initialization
    • Retrieve parameter values via self.get_param(param_name).get()
    • Set parameter values via self.get_param(param_name).set(value)
  • Examples:
    import nevu_ui as ui
    from typing import Unpack, NotRequired
    
    #Create a TypedDict with variables (optional, but looks nice)
    class MyWidgetKwargs(ui.WidgetKwargs):
        my_var: NotRequired[int | float]
    
    class MyWidget(ui.Widget):
        def __init__(self, size: NvVector2 | list, style: Style = default_style, **param_kwargs: Unpack[MyWidgetKwargs]):
            super().__init__(size, style, **param_kwargs)
    
        #Override the function to add parameters (mandatory)
        def _add_params(self):
            super()._add_params()
    
            #Add a parameter (mandatory)
            self._add_param('my_var', int | float)
    
            #You can also add a link to a parameter
            #self._add_param_link('my_var', 'my_var_new_name')
    
            #You can also block a parameter if necessary
            #self._block_param('my_var')
    

Style banner


Dependencies:

Python >= 3.12.*

  • For Building:
    • setuptools >= 61.0
    • Cython
    • numpy
  • For Running:
    • numpy
    • Pillow
  • Additional libraries:
    • pygame-ce>=2.3.0
    • raylib
    • pyyaml

Installation via pip

pip install nevu-ui[all]

Style banner


Example1

Example2

Example3


Basic Grid

Declarative Approach

import nevu_ui as ui #Import Nevu UI
import pygame

pygame.init()

class MyGame(ui.Manager): #Create the base of our application
    def __init__(self):
        super().__init__(ui.Window((400, 300), title = "My Game")) #Initialize the manager
        style = ui.Style(borderradius=20, colortheme=ui.ColorThemeLibrary.material3_dark) #Create Style (optional)
        self.menu = ui.Menu(self.window, [100%ui.vw, 100%ui.vh], style = style, #Create a menu
                            layout= ui.Grid([100%ui.vw, 100%ui.vh], row=3, column=3, #Create a grid layout
                                            content = {
                                                (2, 2): ui.Button(lambda: print("You clicked!"), "BUTTON!", [50%ui.fill, 50%ui.gc], style=style) #Create a button
                                            }
                                            )
                            )
    def on_draw(self):
        self.menu.draw() #draw the menu
    def on_update(self, events):
        self.menu.update() #update the menu

game = MyGame()
game.run() #Run the finished application

Imperative Approach

import nevu_ui as ui #Import Nevu UI
import pygame

pygame.init()

window = ui.Window((400, 300), title = "My Game") #Create a window

style = ui.Style(borderradius=20, colortheme=ui.ColorThemeLibrary.material3_dark) #Create Style
menu = ui.Menu(window, [100%ui.vw, 100%ui.vh], style=style) #Create a menu
layout = ui.Grid([100%ui.vw, 100%ui.vh], row=3, column=3) #Create a grid layout
layout.add_item(ui.Button(lambda: print("You clicked!"), "BUTTON!", [50%ui.fill, 50%ui.gc], style=style), x = 2, y = 2) #Create a button

menu.layout = layout #Set the menu layout

while True: #Main loop
    events = pygame.event.get() #Get events
    window.update(events) #Update the window
    menu.update() #Update the menu
    menu.draw() #Draw the menu
    pygame.display.update() #Update the screen

Example Result

Example1


Style banner


Nevu UI status at the moment.

Layouts (Layout_Type Heirs)

(✅ - done, ❌ - not done, 💾 - deprecated and not working)

  • Grid
  • Row
  • Column
  • ScrollableRow
  • ScrollableColumn
  • ColorPicker
  • 💾 Pages
  • 💾 Gallery_Pages
  • StackColumn
  • StackRow
  • CheckBoxGroup
  • Panel

Widgets (Widget Heirs)

  • Widget
  • Button
  • Label
  • Input
  • EmptyWidget
  • Tooltip (Pygame exclusive, for now)
  • 💾 Gif
  • MusicPlayer (Will be reworked, i guess?)
  • ProgressBar
  • SliderBar
  • ElementSwitcher
  • 💾 FileDialog
  • RectCheckBox
  • Switch

Available Backends

  • Pygame-ce
  • Pygame-ce._sdl2(Sdl)
  • RayLib

Backend Exclusives

  • Ripple effect - Raylib exclusive
  • Transparent colors inside Gradient - Raylib exclusive
  • Customizable center and angle of the gradient - Raylib exclusive
  • Tooltip - Pygame exclusive

Style banner


Nevu UI is protected by the MIT license


Style banner


Nevu UI is NOT a stable framework, you may encounter many bugs in it.

If you found a bug, please report it in the Issues section


Style banner


Gmail: bebrovgolem@gmail.com

Creator: Nikita A.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

nevu_ui-0.8.2-cp314-cp314t-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.14tWindows x86-64

nevu_ui-0.8.2-cp314-cp314t-musllinux_1_2_x86_64.whl (9.7 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

nevu_ui-0.8.2-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (8.9 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

nevu_ui-0.8.2-cp314-cp314-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.14Windows x86-64

nevu_ui-0.8.2-cp314-cp314-musllinux_1_2_x86_64.whl (9.6 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

nevu_ui-0.8.2-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (8.7 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

nevu_ui-0.8.2-cp313-cp313-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.13Windows x86-64

nevu_ui-0.8.2-cp313-cp313-musllinux_1_2_x86_64.whl (9.6 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

nevu_ui-0.8.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (8.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

nevu_ui-0.8.2-cp312-cp312-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.12Windows x86-64

nevu_ui-0.8.2-cp312-cp312-musllinux_1_2_x86_64.whl (9.7 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

nevu_ui-0.8.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (8.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file nevu_ui-0.8.2-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: nevu_ui-0.8.2-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: CPython 3.14t, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nevu_ui-0.8.2-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 b83d4c09b65a0a1d05b8dd291c97eb7f256a7daf39f6464be800a02f16ad9ddc
MD5 da87c47cfff7ee10c78490d9d6084c0a
BLAKE2b-256 0c7b803336ea9c77d9075f769f07c040a48076325fd9318076af590e746fb5b0

See more details on using hashes here.

File details

Details for the file nevu_ui-0.8.2-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.8.2-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3c09839ccbdb1e2a931bf82d5154ac6b1dda7f3da2eb2560e34b509aa4dc30b2
MD5 d8b3df0a99a6e3e4bb8ed3a318096fa6
BLAKE2b-256 92be4a2ccea3590e9c584b8cdf9663080e4149917d25c097e86eca2ae976a43b

See more details on using hashes here.

File details

Details for the file nevu_ui-0.8.2-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.8.2-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 130ff14cc630450b26b598e6192444ee764101636b0cf55cb4b9e5854085b8ab
MD5 068cab16ae3c809e9f9592de013ee678
BLAKE2b-256 a196756c24554606e47b1ff2080e806ca41845a3bf0e035d6e02b87ba1ede5bf

See more details on using hashes here.

File details

Details for the file nevu_ui-0.8.2-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: nevu_ui-0.8.2-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nevu_ui-0.8.2-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 61dd80dcdb94d79a712851cdaf392b772bc0d8c97edbc1df4621a951ceb50902
MD5 cce22599b72aa569cb01d9393e862b0c
BLAKE2b-256 7062e48bef2ae2dea790f6f1fade5e8882e57a9c2b20331d9e64e5b406a087a2

See more details on using hashes here.

File details

Details for the file nevu_ui-0.8.2-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.8.2-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e086aa29d1bf6a90b515a52d32ec9ad2c4c0e3be9591d15f1c7c3fbcfd5d34d1
MD5 189c4b5cfa11bd0fe3a89f6fcce40535
BLAKE2b-256 e531b5c57af9120e78f95e87211fd145e165f8fe0916d5e60f0cd830f4da938a

See more details on using hashes here.

File details

Details for the file nevu_ui-0.8.2-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.8.2-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 45499bb0b02748ddeacfd47906a2d74d1aed402ea4fb29fd8949b0808dda2d66
MD5 15f54a5170938ae3d6635b4cd813e9c1
BLAKE2b-256 1d11154e86682779e296dcf46105bd665f346df5c87db89829312ecd408bd24b

See more details on using hashes here.

File details

Details for the file nevu_ui-0.8.2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: nevu_ui-0.8.2-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nevu_ui-0.8.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c996034f878c4951d3994ed5c6e47b3023bb4c470795db78102ed8c3954e69da
MD5 8b80d9c49ecd8b6c155753054b6d9a35
BLAKE2b-256 91c2d4df46a76333f31f6fe3d565ed253101bbfd297b783ec68f8eca53b52c04

See more details on using hashes here.

File details

Details for the file nevu_ui-0.8.2-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.8.2-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f87374c9b16520a3b2d820c7924d2c205ae995f96d6248188ec2f391ef7b9c37
MD5 ade8e952afbdb83989c381e007f9e801
BLAKE2b-256 a1ad819310c839dc6af96158d9aba13c68900f8203f9d81c441ad4c9c95af1c1

See more details on using hashes here.

File details

Details for the file nevu_ui-0.8.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.8.2-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f49e04f1d8646a8b5798b0b8e42f0b3dfe60d881b7bde66b379ffc402219dbc7
MD5 5e8439cfc2b7a2f10c386d187fdab20a
BLAKE2b-256 05b5e98ccfb59e0b77ba0bc4b3a45a22d2238892e3e399c0fc9fc34dca67b9fe

See more details on using hashes here.

File details

Details for the file nevu_ui-0.8.2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: nevu_ui-0.8.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nevu_ui-0.8.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f99029236bb6380cf802f43dc8be587c9abddfa0515a154df6d0c4207f57fd29
MD5 1946f53ae4b1acac54dcb3380316f477
BLAKE2b-256 859f5a8c9b17e6c79dbd770011e2ad1222b579175d3a8c08b6cd2e77bda437e2

See more details on using hashes here.

File details

Details for the file nevu_ui-0.8.2-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.8.2-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 8e71dce1e80b7990e67412cf1543163dd03afd8ab9a67f450a99b92d118f6516
MD5 40edcf1298b2caaf6875e1db79b44100
BLAKE2b-256 39565164e48edd28a16b6cb639c82477d8cc7bd0d4304610d49276b1fdc71617

See more details on using hashes here.

File details

Details for the file nevu_ui-0.8.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.8.2-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9c4f61e9c7fc075350903b8e13cf6349b3591a72d9fdb72b716a48ca53c655a8
MD5 5de577610cb05212fc7aaf88c7c6ba52
BLAKE2b-256 236aa70a8a2eaf029b48c229f9ba71028e4f92d9fcbda2652fc6fed2f8fd9c11

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page