This repo contains a set of common python, kivy & kivymd utilities I have found myself using throughout the years and a base template for my projects.
These instructions will get you a copy of the project up and running on your local machine for personal use, development or testing purposes. There are two ways which you can get the project working:
Setting up the program using pre-packaged executables doesn't require anything. Simply download the best provided package for your machine (based on your os and architecture).
Current available packages are:
- Windows (.exe)
- RHEL & Fedora (.rpm)
- Ubuntu (.deb)
- Android (.apk)
- IOS (.ipa)
If you cannot find a package that matches your machine, you can follow the rest of this guide to set up the project from source.
If your operating system or architecture is not included in the packages list, or you plan on contributing or testing the project you can set it up from the source code. follow these steps as mentioned:
-
You MUST have a python >= 3.8 interpreter installed on your machine. In order to check your python version, you can do:
python3 --version
If you are on Windows, you can visit the download section of the official python website in order to download a matching version.
If you are on Linux OR Mac, you already have python installed, but it is highly possible that is does not match the minimum required version. You can get a matching version using the package manager on your machine, like so:
On Ubuntu:
sudo apt install python3
On Fedora:
sudo dnf install python3
On Mac (Using homebrew):
brew install python
-
You MUST also have pip installed. In order to check if you have pip installed, you can do:
pip --version
If you are on Windows, you probably have pip installed alongside python. If not, follow the official pip installation guide.
If you are on Linux OR Mac, using your package manager you can install pip, like so:
On Ubuntu:
sudo apt install python3-pip
On Fedora:
sudo dnf install python3-pip
On Mac:
python3 -m pip install --upgrade pip
-
You MUST also have git installed on your machine to be able to copy the repo, otherwise you are going to have to manually copy and paste the files' content. In order to check if you have git installed, you can do:
git --version
If you are on Windows, you can visit the download section of the official git website and follow their guides to have it setup on your machine.
If you are on Linux OR Mac, you can easily install git through your package manager, like so:
On Ubuntu:
sudo apt install git
On Fedora:
sudo dnf install git
On Mac (Using homebrew):
brew install git
-
(OPTIONAL) If you are on Linux OR Mac, for better keyboard integration it is recommended to install the xclip and xsel packages. Examples:
On Ubuntu:
sudo apt install xclip xsel
On Fedora:
sudo dnf install xclip xsel
On Mac (Using homebrew):
brew install xclip xsel
-
You MUST have an ffmpeg build installed on your machine. Since the program relies on ffmpeg as its audio provider it should also be added to the PATH environmental variable. In order to check if you have ffmpeg installed, you can do:
ffmpeg -version
If you are on Windows, you can visit gyan.dev to install a pre-complied ffmpeg build. It is recommended that you install one of the release builds.
If you are on Debian, Ubuntu OR Mac, you can easily install ffmpeg through your package manager, like so:
On Ubuntu:
sudo apt install ffmpeg
On Mac (Using homebrew):
brew install ffmpeg
If you are on Fedora, you must first enable and configure the RPM fusion repo:
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm sudo dnf install ffmpeg
-
Clone the repository (copy the source code):
git clone https://github.com/Eastern-Skill7173/PythonKivySharedSnippets.git
TIP: you can add a
--depth 1
to the end of the command to only copy the latest version of each file if you are planing on just using the project, like so:git clone https://github.com/Eastern-Skill7173/PythonKivySharedSnippets.git --depth 1
After cloning the repo, in order to simplify the setup process, you can run one of the pre-written automation scripts based on your operating system:
-
On Windows, click on the
installtion_script.bat
file inside thePythonKivySharedSnippets
folder. -
On Linux or Mac, Open your terminal and switch to the cloned repo's directory, then run the following command:
sh installation_script.sh
The scripts will install the program in its location.
If you want to do it manually follow the next steps:
-
It is highly recommended that you create a python virtual environment. A virtual environment helps organize projects and prevent python package conflicts.
-
Ensure you have the latest setuptools and virtualenv packages installed:
pip3 install setuptools virtualenv
-
Create a virtual environment named venv in the current working directory
python3 -m virtualenv venv
-
Activate the virtual environment. Beware that everytime a new terminal session is launched you are going to have to re-activate the virtual environment
If you are on Windows CMD (default terminal):
.\venv\Scripts\activate
If you are on a BASH terminal on Windows:
source ./venv/Scripts/activate
If you are on Linux OR Mac:
source ./venv/bin/activate
You should now see the name of the virtual environment as a prefix on each line of the terminal. This indicates that the virtual environment has been turned on successfully.
-
-
Install the mentioned requirements in the
requirements.txt
file using pip, like so:pip3 install -r requirements.txt
-
The project is now installed! All that is remaining is to run the
main.py
file, like so:python3 main.py
Installing project from source has many benefits, the most important one being that in the future if any updates are released you can easily just update the files and re-run the script, like so:
git pull
Another great feature is that you can change the code however you like! If there is a specific feature that is not covered by the project you can add it yourself!
Explain how to run the automated tests for this system
Explain what these tests test and why
Give an example
Explain what these tests test and why
Give an example
- Python - The core programming language
- Kivy - The core GUI framework
- KivyMD - Kivy widget extensions following material design
Please read CONTRIBUTING.md & CODE_OF_CONDUCT.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Eastern-Skill7173 - creator and maintainer
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details
- Special thanks to the kivy & kivymd team
- Anyone who has shared or committed to the project
- Also, Billie Thompson for this README template