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
  • 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.post1-cp314-cp314t-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.14tWindows x86-64

nevu_ui-0.8.2.post1-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.post1-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.post1-cp314-cp314-win_amd64.whl (3.2 MB view details)

Uploaded CPython 3.14Windows x86-64

nevu_ui-0.8.2.post1-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.post1-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.post1-cp313-cp313-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.13Windows x86-64

nevu_ui-0.8.2.post1-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.post1-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.post1-cp312-cp312-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.12Windows x86-64

nevu_ui-0.8.2.post1-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.post1-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.post1-cp314-cp314t-win_amd64.whl.

File metadata

File hashes

Hashes for nevu_ui-0.8.2.post1-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 0c6d8980dafcb6dbcaa1a118b3d8cad8c1e26927cdf9b7523d6e164eb9cbeb0f
MD5 ea5b5d3032daa148db6384468a9966dd
BLAKE2b-256 f07e49233b238ede5693638bfab09588343c71eda3e23c54b78c714ff927b131

See more details on using hashes here.

Provenance

The following attestation bundles were made for nevu_ui-0.8.2.post1-cp314-cp314t-win_amd64.whl:

Publisher: build_wheels.yml on GolemBebrov/nevu-ui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.8.2.post1-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b7dca52cdc7619e0514abc1ceb40e1f55443703e41f747d0e617e0986dd4cf16
MD5 1a966d6827696b78e0a7a779980fe118
BLAKE2b-256 1331991e8ced72a86f78443ee4c0a834cd3624c562a3da567cb0693707b7c240

See more details on using hashes here.

Provenance

The following attestation bundles were made for nevu_ui-0.8.2.post1-cp314-cp314t-musllinux_1_2_x86_64.whl:

Publisher: build_wheels.yml on GolemBebrov/nevu-ui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.8.2.post1-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f09276316af33e52d03c92b7060cd9c507465607918c8850a42e1437ffcff182
MD5 eab790dd094266b09a3886263c056ff5
BLAKE2b-256 c749a6d3bc41c83de91ba7245425fabddcad6ced9991168466adae39c9569ba9

See more details on using hashes here.

Provenance

The following attestation bundles were made for nevu_ui-0.8.2.post1-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on GolemBebrov/nevu-ui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.8.2.post1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 433705ad6f798868235f0b811e2e2cfd11c7c652ffeee1d077036b78f73dcca8
MD5 8656b5cbcb67b50dcdfbd81c1c22a86c
BLAKE2b-256 a0366df697ae69b6baac514e8530bb16dfc3262060f022a4a5d595b687d2599a

See more details on using hashes here.

Provenance

The following attestation bundles were made for nevu_ui-0.8.2.post1-cp314-cp314-win_amd64.whl:

Publisher: build_wheels.yml on GolemBebrov/nevu-ui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.8.2.post1-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 47a79a3addfa5d85ba1766d624869d8ab8c252b1004f27bc0460aa0564973362
MD5 880564cdd7d6ff2980a8e622f5f02f48
BLAKE2b-256 19cd8026012dfc6bc3657e5b7c384032e55049f4a2d56cb4c9eca988193686ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for nevu_ui-0.8.2.post1-cp314-cp314-musllinux_1_2_x86_64.whl:

Publisher: build_wheels.yml on GolemBebrov/nevu-ui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.8.2.post1-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 68c9ce034256c437e1fcd200d79a03046c2292dd4805beff1caab7b8a3a9005a
MD5 3cdaf0552de8f2a2dd2fb8654d5a3caa
BLAKE2b-256 1b99f63b22ce5299f8dab49e1a09bd872680f92d7102858790040123c71c2a9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for nevu_ui-0.8.2.post1-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on GolemBebrov/nevu-ui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.8.2.post1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5272573704977c02da3d04660e0bc63afabedae5f037194773c9d7cd42880a7e
MD5 0977cbc82596a09a4a52d5ccd6552fb5
BLAKE2b-256 1fa2d714f7115d433805c01d76c917d542ce82697c5c8712b6208cbebcbe3202

See more details on using hashes here.

Provenance

The following attestation bundles were made for nevu_ui-0.8.2.post1-cp313-cp313-win_amd64.whl:

Publisher: build_wheels.yml on GolemBebrov/nevu-ui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.8.2.post1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d5bbedc1ba2afe005b6e1e4a140ef7142489a7adefe86c0d41cf5874f47aa89f
MD5 06bd407056f18fc7386d4b32b13eb973
BLAKE2b-256 c1416676bf07f4441bfc290b2a13e40932b1165d774417f0792f232aefdf59d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for nevu_ui-0.8.2.post1-cp313-cp313-musllinux_1_2_x86_64.whl:

Publisher: build_wheels.yml on GolemBebrov/nevu-ui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.8.2.post1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f6fee8d697815f3136dd2b02e5360765237a3ec42877f52391cbd053fa9d66db
MD5 2de3e4479cc2a56455d778e7c993cdde
BLAKE2b-256 f4219c060fde9031f42da76f97def97817fceab84486c302e6b44115c81b21cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for nevu_ui-0.8.2.post1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on GolemBebrov/nevu-ui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.8.2.post1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f8663a770a71f3246456ad08ec5ab1903a1f713f83583cbf452c572aa2d59dd3
MD5 e780445c2049e7098a8694f0746dc5e9
BLAKE2b-256 127e187fa71cc7bd8db3e6a5b96c2ed4488ecf047747ce3b175117b48131394a

See more details on using hashes here.

Provenance

The following attestation bundles were made for nevu_ui-0.8.2.post1-cp312-cp312-win_amd64.whl:

Publisher: build_wheels.yml on GolemBebrov/nevu-ui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.8.2.post1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e537c4d3453e63fc6b62fa5550daac872c3631874aea5ea0df85deac986cc0fc
MD5 b3157e5a5a07918cb49aa8622a54708f
BLAKE2b-256 be7ad57f353752309e853ccc49f0be6f9314b24c41a58365463d1e3cb1c25a1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for nevu_ui-0.8.2.post1-cp312-cp312-musllinux_1_2_x86_64.whl:

Publisher: build_wheels.yml on GolemBebrov/nevu-ui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for nevu_ui-0.8.2.post1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 691fc9cdd0c9498b003f692823f0d268fed8d2eff2a26474916620664a304bae
MD5 8971853b3a1be39f0361a4793830e04a
BLAKE2b-256 d0e37eb8167fff36e3aa4966c385cdd789d5f11dafffb9eee2c6efe88dc7cef8

See more details on using hashes here.

Provenance

The following attestation bundles were made for nevu_ui-0.8.2.post1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build_wheels.yml on GolemBebrov/nevu-ui

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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