CTkRatingStar


NameCTkRatingStar JSON
Version 0.0.1 PyPI version JSON
download
home_pageNone
SummaryA customizable star rating widget for CustomTkinter applications.
upload_time2024-10-29 23:39:38
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License
keywords customtkinter star rating widget
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # CtkRatingStar

A customizable star rating widget for CustomTkinter applications. This widget provides an intuitive and visually appealing way to implement rating functionality in your CustomTkinter projects.

![{318EAF2F-AE07-4A1A-91C1-E1E98727C51B}](https://github.com/user-attachments/assets/95bb8a5f-c907-4d1d-aaef-87c397a340dc)

## Features

- Customizable number of stars
- Smooth hover effects
- Current value display
- Optional title and rating label
- Easy integration with existing CustomTkinter applications

## Installation

```bash
# Clone the repository
git clone https://github.com/ZachVFXX/CtkRatingStar.git

# Navigate to the project directory
cd ctk-star-rating

# Install required dependencies
pip install customtkinter Pillow
```

## Usage

Here's a simple example of how to use the `CtkStarRating` widget:

```python
import customtkinter as ctk
from ctk_star_rating import CtkStarRating

class App(ctk.CTk):
    def __init__(self):
        super().__init__()
        
        # Create the star rating widget
        star_rating = CtkStarRating(
            self,
            number_of_stars=5,     # Number of stars to display
            current_value=3,       # Initial rating value
            title="Rating:",       # Optional title
            current_value_label="/5" # Optional value label
        )
        star_rating.pack(pady=10)
        
        # Get the current rating value
        value = star_rating.get_value()

if __name__ == "__main__":
    app = App()
    app.mainloop()
```

## Customization Options

The `CtkStarRating` widget accepts the following parameters:

- `number_of_stars` (int): Number of stars to display (default: 5)
- `current_value` (int): Initial rating value (default: 1)
- `title` (str, optional): Title text to display above the stars
- `current_value_label` (str, optional): Label to display after the current value

## Required Assets

The widget requires the following image assets in the `assets` directory:
- `full_star.png`: Filled star image
- `empty_star.png`: Empty star image
- `full_star_hover.png`: Filled star hover state
- `hover_star.png`: Empty star hover state

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Author

- [ZachVFXX](https://github.com/ZachVFXX)

## Acknowledgments

- Built with [CustomTkinter](https://github.com/TomSchimansky/CustomTkinter)
- Uses [Pillow](https://python-pillow.org/) for image handling

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "CTkRatingStar",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "customtkinter, star, rating, widget",
    "author": null,
    "author_email": "ZachVFX <zachallrd@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/be/5f/905f48171642ae3b3007bba6f11fce1b0e2aadca1824c30dd2b95cb36a0c/ctkratingstar-0.0.1.tar.gz",
    "platform": null,
    "description": "# CtkRatingStar\r\n\r\nA customizable star rating widget for CustomTkinter applications. This widget provides an intuitive and visually appealing way to implement rating functionality in your CustomTkinter projects.\r\n\r\n![{318EAF2F-AE07-4A1A-91C1-E1E98727C51B}](https://github.com/user-attachments/assets/95bb8a5f-c907-4d1d-aaef-87c397a340dc)\r\n\r\n## Features\r\n\r\n- Customizable number of stars\r\n- Smooth hover effects\r\n- Current value display\r\n- Optional title and rating label\r\n- Easy integration with existing CustomTkinter applications\r\n\r\n## Installation\r\n\r\n```bash\r\n# Clone the repository\r\ngit clone https://github.com/ZachVFXX/CtkRatingStar.git\r\n\r\n# Navigate to the project directory\r\ncd ctk-star-rating\r\n\r\n# Install required dependencies\r\npip install customtkinter Pillow\r\n```\r\n\r\n## Usage\r\n\r\nHere's a simple example of how to use the `CtkStarRating` widget:\r\n\r\n```python\r\nimport customtkinter as ctk\r\nfrom ctk_star_rating import CtkStarRating\r\n\r\nclass App(ctk.CTk):\r\n    def __init__(self):\r\n        super().__init__()\r\n        \r\n        # Create the star rating widget\r\n        star_rating = CtkStarRating(\r\n            self,\r\n            number_of_stars=5,     # Number of stars to display\r\n            current_value=3,       # Initial rating value\r\n            title=\"Rating:\",       # Optional title\r\n            current_value_label=\"/5\" # Optional value label\r\n        )\r\n        star_rating.pack(pady=10)\r\n        \r\n        # Get the current rating value\r\n        value = star_rating.get_value()\r\n\r\nif __name__ == \"__main__\":\r\n    app = App()\r\n    app.mainloop()\r\n```\r\n\r\n## Customization Options\r\n\r\nThe `CtkStarRating` widget accepts the following parameters:\r\n\r\n- `number_of_stars` (int): Number of stars to display (default: 5)\r\n- `current_value` (int): Initial rating value (default: 1)\r\n- `title` (str, optional): Title text to display above the stars\r\n- `current_value_label` (str, optional): Label to display after the current value\r\n\r\n## Required Assets\r\n\r\nThe widget requires the following image assets in the `assets` directory:\r\n- `full_star.png`: Filled star image\r\n- `empty_star.png`: Empty star image\r\n- `full_star_hover.png`: Filled star hover state\r\n- `hover_star.png`: Empty star hover state\r\n\r\n## Contributing\r\n\r\nContributions are welcome! Please feel free to submit a Pull Request.\r\n\r\n1. Fork the repository\r\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\r\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\r\n4. Push to the branch (`git push origin feature/AmazingFeature`)\r\n5. Open a Pull Request\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## Author\r\n\r\n- [ZachVFXX](https://github.com/ZachVFXX)\r\n\r\n## Acknowledgments\r\n\r\n- Built with [CustomTkinter](https://github.com/TomSchimansky/CustomTkinter)\r\n- Uses [Pillow](https://python-pillow.org/) for image handling\r\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "A customizable star rating widget for CustomTkinter applications.",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://github.com/ZachVFXX/CtkRatingStar/tree/main",
        "Issues": "https://github.com/ZachVFXX/CtkRatingStar/issues"
    },
    "split_keywords": [
        "customtkinter",
        " star",
        " rating",
        " widget"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ebe1e870a71a9403ed9dfb9400ebb74ca8979dae5b5f260404dd3cc61109bce0",
                "md5": "f144fa6b560967f08ede38f4457f1f9c",
                "sha256": "d38f1fe41fe4cd4b9c245f14e9e7e4653324e660db1764b29ca2feefef7347da"
            },
            "downloads": -1,
            "filename": "CTkRatingStar-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f144fa6b560967f08ede38f4457f1f9c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 17495,
            "upload_time": "2024-10-29T23:39:34",
            "upload_time_iso_8601": "2024-10-29T23:39:34.166782Z",
            "url": "https://files.pythonhosted.org/packages/eb/e1/e870a71a9403ed9dfb9400ebb74ca8979dae5b5f260404dd3cc61109bce0/CTkRatingStar-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "be5f905f48171642ae3b3007bba6f11fce1b0e2aadca1824c30dd2b95cb36a0c",
                "md5": "24007b9e464733ba6f00242eff6de74b",
                "sha256": "74edea6d3f29d380f9edf78bec159cc5d345c97644e76946856ba10a3acb0dea"
            },
            "downloads": -1,
            "filename": "ctkratingstar-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "24007b9e464733ba6f00242eff6de74b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 17077,
            "upload_time": "2024-10-29T23:39:38",
            "upload_time_iso_8601": "2024-10-29T23:39:38.833297Z",
            "url": "https://files.pythonhosted.org/packages/be/5f/905f48171642ae3b3007bba6f11fce1b0e2aadca1824c30dd2b95cb36a0c/ctkratingstar-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-29 23:39:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ZachVFXX",
    "github_project": "CtkRatingStar",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "ctkratingstar"
}
        
Elapsed time: 0.44755s