kivy | Open source UI framework written in Python | iOS library

 by   kivy Python Version: 2.3.0rc3 License: MIT

kandi X-RAY | kivy Summary

kandi X-RAY | kivy Summary

kivy is a Python library typically used in Mobile, iOS, Framework applications. kivy has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has high support. You can install using 'pip install kivy' or download it from GitHub, PyPI.

Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              kivy has a highly active ecosystem.
              It has 15962 star(s) with 3027 fork(s). There are 613 watchers for this library.
              There were 5 major release(s) in the last 6 months.
              There are 900 open issues and 3870 have been closed. On average issues are closed in 665 days. There are 77 open pull requests and 0 closed requests.
              It has a positive sentiment in the developer community.
              The latest version of kivy is 2.3.0rc3

            kandi-Quality Quality

              kivy has 0 bugs and 0 code smells.

            kandi-Security Security

              kivy has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              kivy code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              kivy is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              kivy releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.

            Top functions reviewed by kandi - BETA

            kandi has reviewed kivy and discovered the below as its top functions. This is intended to give you an instant insight into kivy implemented functionality, and help decide if they suit your requirements.
            • Dispatch a node .
            • Shorten the post text .
            • Layout hint_hint
            • Indent the continuation line .
            • helper function to apply a rule
            • Filter the parameters .
            • Parse a list of objects .
            • Called when a touch is started .
            • Iterate layout .
            • Fetch the current URL
            Get all kandi verified functions for this library.

            kivy Key Features

            No Key Features are available at this moment for kivy.

            kivy Examples and Code Snippets

            Usage-Build a Kivy or SDL2 application
            Pythondot img1Lines of Code : 0dot img1License : Permissive (MIT)
            copy iconCopy
            p4a apk --private $HOME/code/myapp --package=org.example.myapp --name "My application" --version 0.1 --bootstrap=sdl2 --requirements=python3,kivy  
            Remove space between widgets in Kivy app python
            Pythondot img2Lines of Code : 30dot img2License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            from kivy.app import App
            from kivy.lang import Builder
            from kivy.core.window import Window
            
            kv = '''
            GridLayout:
                cols: 1
                size_hint: (0.7, 0.9)
                pos_hint: {"center_x": 0.5, "center_y": 0.5}
                
                Image:
                    source: 'captus
            Understand Kivy order-of-creation, changing root widget results in crash
            Pythondot img3Lines of Code : 13dot img3License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            class MainScreenManager(ScreenManager):
            
                def on_kv_post(self, base_widget):
                    if not SHOW_SPLASH_SCREEN:
                        self.transition = NoTransition()
                        self.current = 'screen_main'
                        self.transition = FadeTran
            Clean way to close splashscreen in kivy after a delay
            Pythondot img4Lines of Code : 50dot img4License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            import #what u need
            
            Builder.load_file('the.kv')
                  
            
            class fscreen(Widget):
                def __init__(self, **kwargs):
                    super().__init__(**kwargs)
                    
            
            class secscreen(Widget):
            
                def __init__(self,**kwargs):
                    super().__ini
            Clean way to close splashscreen in kivy after a delay
            Pythondot img5Lines of Code : 4dot img5License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            Clock.schedule_once(switch_to_main_screen, 3)
            
            Clock.schedule_once(lambda dt: setattr(self, 'current', 'main_screen'), 3)
            
            Change Value of a Kivy Property from a seperate File
            Pythondot img6Lines of Code : 39dot img6License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            INITIAL_BOUNDED_VALUE = 20
            
            class test(ScreenManager):
                value = BoundedNumericProperty(testvars.INITIAL_BOUNDED_VALUE, min = 0, max = 24)
            
            from kivy.event import EventDispatcher
            from kivy.
            I can't update the content of a Kivy label from Python
            Pythondot img7Lines of Code : 4dot img7License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            MainApp().update_lbl()
            
            App.get_running_app().update_lbl()
            
            Is there a way to access properties(class variables) from another screen
            Pythondot img8Lines of Code : 20dot img8License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            class Main(Screen):
                transport_price_value = NumericProperty(0)
            
                def change_value_on_press(self):
                    self.transport_price_value += 10
            
            
            class Second(Screen):
                 def display_transport_price_value(self):
                     main_screen = 
            running kivy shows black screen
            Pythondot img9Lines of Code : 2dot img9License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            Builder.load_file('random.kv')
            
            Storing selection of TextInput when not is focus (Kivy)
            Pythondot img10Lines of Code : 21dot img10License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            class MyTextInput(TextInput):
                selected_text = StringProperty("")
                # Use this prop. instead of 'selection_text'.
            
                def cancel_selection(self):
                    self.selected_text = self.selection_text
                    super().cancel_selection()
            

            Community Discussions

            QUESTION

            Kivy/Python code displaying white screen on rpi touchscreen
            Asked 2022-Mar-23 at 03:26

            I'm having some trouble with some code I wrote that appears to work on the desktop, but when copied to my raspberry pi/touchscreen, I get a purely blank screen. Rpi has kivy installed. Kivy demos work just fine on both systems. Is there a chance there is something with import Window on kivy? Any advice would be greatly appreciated!

            EDIT 1: I read online of someone else with a similar issue, needed to add (from kivy.lang.builder import Builder) and (Builder.load_file.py). I added this in the python code, which is letting me see most of the original program. Some of Kivy is showing, though for some reason- the graphic menu.png is missing and so is the textbox/grid layout at the bottom of the page (bottom of the kivy code below). This may be due to my positioning, so I will look into this.

            Edit 2: This should be resolved- it was implementing Builder to the python code (correct version seen below). I also discovered- the raspberry pi might have an issue with images named 'menu.png'... Just changed the name of the image and everything was visible. No idea on that one. Thanks for the assistance.

            Python Code:

            ...

            ANSWER

            Answered 2022-Mar-23 at 03:26

            Had the same issue. Solved it by increasing the memory dedicated to the GPU on the Raspberry Pi.

            Edit your /boot/config.txt file (sudo required)

            Scroll down to the [all] section, and edit the gpu_mem line as follows:

            gpu_mem=256

            Then reboot your pi.

            Source https://stackoverflow.com/questions/70801067

            QUESTION

            How to change a KivyMD Menu caller to a Widget in a ScreenManager Screen
            Asked 2022-Feb-21 at 18:49

            So, I'm working on a simple kivy app and I have three buttons (MDRaisedButton's) which each open the same KivyMD Menu (MDDropdownMenu) on release.

            1. Two of these buttons are in different ScreenManager screens.

            2. The other button is in a GridLayout in the Screen outside the ScreenManager.

            When I open the menu using the buttons inside of the ScreenManager, the menu appears at the button that is outside of the ScreenManager, no matter which button I press.

            So how can I change the caller, or the position of the menu when it appears to be that of the buttons in my ScreenManager screens?

            Me clicking on the button inside the ScreenManager screen:

            The menu appears on the wrong button:

            Code:

            ...

            ANSWER

            Answered 2022-Feb-21 at 18:49

            Look at the following line in your code for the MDRaisedButton on_release event handler.

            Source https://stackoverflow.com/questions/70579854

            QUESTION

            Python3+Kivy+Plyer Push notification icon problem
            Asked 2022-Feb-06 at 11:59

            I've a weird error using a simple notification testing app using android.

            The error:

            ...

            ANSWER

            Answered 2021-Sep-23 at 22:08

            I had the same problem and found the problem and a workaround, not the solution though:

            The problem lies within the Drawable Object created in the file plyer/platforms/android/notification.py. If you print(dir(Drawable)), you will find no attibute icon (as the error message stated). I don't know why the icon attribute is missing, but you will find there is a presplash attribute instead (which is also a .png file and thus replaceable).

            By changing line 100 in the notification.py from app_icon = Drawable.icon to app_icon = Drawable.presplash, I could dodge the error and my app worked perfectly well. You need to change the line in the correct file though, which is located at ProjectName/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/projectname/plyer/platforms/android.

            Source https://stackoverflow.com/questions/69192439

            QUESTION

            Kivy widget generation very slow
            Asked 2022-Jan-25 at 08:32

            I'm making a kivy app to find the rhyming words for a word entered by the user. It displays all the rhyming words as OneLineListItems in an MDList which is inside a kivy RecycleView. On clicking on one of these OneLineListItems it displays the definition of the word on the right-hand side of the screen. However, when I click on a OneLineListItem its definition takes very long to appear and sometimes it lags so badly that the app closes. Am I doing something wrong or is it just my computer? Code below:

            ...

            ANSWER

            Answered 2022-Jan-25 at 08:32

            First create a custom class for the data-class like following:

            Source https://stackoverflow.com/questions/70838737

            QUESTION

            How to in kivy make labels go to the next line if the window size is not big enough
            Asked 2022-Jan-06 at 03:38

            '''

            ...

            ANSWER

            Answered 2022-Jan-06 at 02:50

            You can use the text_size attribute, like this:

            Source https://stackoverflow.com/questions/70601489

            QUESTION

            How to build an .aab using Buildozer via Docker?
            Asked 2021-Nov-26 at 13:34

            I have just seen that support for AAB files have just been introduced in Python for Android (p4a). Considering that, fom August 2021, new apps are required to publish with the Android App Bundle on Google Play, this is a crucial addition for any Python dev working on Android apps.

            Since I'm currently using Buildozer via Docker, I'd like to know which are the steps to make it generating an .aab instead of (or along to) the traditional .apk

            For the sake of clarity, here is what I use to run Buildozer from inside a container (using Docker for Windows) to make the .apk file:

            ...

            ANSWER

            Answered 2021-Nov-26 at 13:34

            The community has finally completed the AAB support for Buildozer. Although it is still a pending pull request, it is already possible to create the AAB, and I have figured out how to do it using Docker.

            I have found two very interesting gists that helped me a lot (this one about creating an AAB with Buildozer on Ubuntu, and another one about signing an AAB on the same platform). However, I have run everything on Windows via Docker, so I think it is a good idea to share how I did it.

            1. Clone the feat/aab-support branch of the Buildozer repository in your local machine:

            Source https://stackoverflow.com/questions/69149494

            QUESTION

            Impossible to install Kivy for Python
            Asked 2021-Nov-09 at 14:09

            I don't understand why I can't install kivy.

            I'm on Windows 10 64 bits with Python 3.10.

            I have tried with pip, pip3, on administrator command, to install the master.zip.

            Always the same error (and same with Python 3.9)

            Here the terminal print:

            ...

            ANSWER

            Answered 2021-Nov-09 at 14:09

            After reading the document about kivy https://kivy.org/doc/stable-1.10.1/installation/installation-windows.html

            Kivy can be installed with one of the following python versions:

            • Python 2.7, 32-bit
            • Python 3.4, 32-bit
            • Python 3.5, 32-bit
            • Python 3.6, 32-bit
            • Python 2.7, 64-bit
            • Python 3.4, 64-bit
            • Python 3.5, 64-bit
            • Python 3.6, 64-bit

            Source https://stackoverflow.com/questions/69796586

            QUESTION

            pip installations hang (Windows 10) (python 3.10)
            Asked 2021-Oct-09 at 22:10

            I recently reinstalled python because weird stuff was happening with imports and virtual environments.

            Now, when I try to install a library -- kivy, for example -- this happens:

            ...

            ANSWER

            Answered 2021-Oct-09 at 22:10

            I do not know why it is getting stuck, but what I see is that you are using python 3.10, which is so fresh, that I had to go check to see if it is already released (it is! 5 days ago!).

            kivy does not have a wheel for 3.10, so it is trying to build one from the source, and crashes because of the missing kivy-deps.gstreamer-dev dependency, which is binary only and not available for python 3.10.

            I deduce, that it is unlikely that you will be able to install kivy with python 3.10. Try 3.9?

            Source https://stackoverflow.com/questions/69510844

            QUESTION

            how do i get information from 1 class to another
            Asked 2021-Sep-25 at 16:48

            New to python - kivy - gui

            im trying to get information from 1 class to another, the classes is basically the different screens i have for my GUI. ive research the return function but its not helping at all because im a noob.

            main GUI running on .kv file this is a breakdown of my code.

            ...

            ANSWER

            Answered 2021-Sep-25 at 16:48

            What you Need is global variables. Did you know about scopes? In Short Global variable is a type of variable that can be accessed/Modified from anywhere in the code file. Here's an Example :

            Source https://stackoverflow.com/questions/69328113

            QUESTION

            How do I automatically Set MDCard height
            Asked 2021-Sep-04 at 23:23

            I want to set mdcard height such that it fits mdlabel, perhabs without me manually setting mdcard size. please how do I do this.. Thanks in Advance..

            For better understanding here's a sample code:

            ...

            ANSWER

            Answered 2021-Sep-04 at 23:23

            You can set the height of the MDCard to be the same as the height of the MDLabel, but you must allow the MDLabel to adjust to the size of its text. Here is a modified version of your kv that does that:

            Source https://stackoverflow.com/questions/69055072

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install kivy

            You can install using 'pip install kivy' or download it from GitHub, PyPI.
            You can use kivy like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            Extensive installation instructions as well as tutorials and general documentation, including an API reference, can be found at https://kivy.org/docs. A [PDF version](https://media.readthedocs.org/pdf/kivy/latest/kivy.pdf) is also available. Kivy ships with many examples which can be found in the examples folder.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install Kivy

          • CLONE
          • HTTPS

            https://github.com/kivy/kivy.git

          • CLI

            gh repo clone kivy/kivy

          • sshUrl

            git@github.com:kivy/kivy.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link