Video Demo: https://www.youtube.com/watch?v=8aJC0TKUsjg
Flagant is an app to search and view country flags. The app works completely offline, and supports 255 flags as of latest update. Countries are searched via typo tolerant fuzzy search.
The app icon is actually a pun on the app's name ending in 'ant' and represents an ant with a flag behind it (the Indian national flag.)
Note: Ensure you have the following required files and folders in your project root before proceeding:
project.pyfavicon.icotest_project.pyflags/(folder containing all the flag images)All these prerequisites are bundled with the project and also provided in the distributed archive for the project.
Install all the dependencies by running following command in your terminal:
pip install -r requirements.txt
OR
python -m pip install -r requirements.txt
Then run:
python ./project.py
On windows you may have to use python.exe instead of python.
And that's it!
First look at Flagant, on launch.

Searching for a country (note how closer matches are preferred.)

Fuzzy search (for more matches and typo tolerance)

flagant/
├── flags/
│ ├── [country_name].png
│ └── ...
├── favicon.ico
├── requirements.txt
├── project.py
└── test_project.py
requirements.txt lists all third party modules and is fed into pip for setup.favicon.icocontains the icon for the program.project.pycontains all the code for the app.test_project.pycontains tests for some of the functions of project.py.
Originally this app's catchphrase was "Flagant - Flags and anthems" (Flagant from Flags and anthems.) The app was originally intended to show country flags while simultaneously playing that country's anthem.
However I soon realized that adding the anthem feature would make the app too complex for a simple CS50 project (a big factor was having to find national anthems for all these countries and handle those that do not have a readily available one.) and a simple stripped down version supporting only the flags feature is fairly good to submit on its own.
As I preferred the name of my app to still be "Flagant", I decided to change the catchphrase instead. So the catchphrase was changed from "Flagant - Flags and Anthems" to "Flagant - Country Flags, Elegant".
This project has been possible thanks to python and the following libraries:
- Customtkinter: for GUI interface
- Pillow: for opening image file for displaying
- Pycountry: for country names and codes
- Rapidfuzz: for fuzzy search.
Special thanks to https://github.com/hampusborgos/country-flags for providing country flags.
Also, special thanks to the entire CS50p and CS50 team for always providing such amazing courses.
This project is licensed under the MIT License - see the LICENSE file for details.
