photonic


Namephotonic JSON
Version 0.0.1 PyPI version JSON
download
home_page
SummaryMy neat tools grouped together!
upload_time2023-10-11 18:41:46
maintainer
docs_urlNone
author
requires_python>=3.6
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Photonic Utilities Library
## Description
Photonic is the library where I upload all my neat tools!

### _logging
This package is designed to make logging easier and customizable.  

**Quick start:**  
1) You need to configure your logger before using it, here is an example:


    logger_name = "my_logger"

    console_config(logger_name)  # This makes the logger log to the console (with colors)!
    json_file_config(logger_name)  # This makes the logger log to a json file (more detailed too).

2) Now, we are all set! To use the logger all you need to do is:


    logger = getLogger("my_logger")

    logger.debug(f"Test Message from logger.debug")
    logger.info(f"Test Message from logger.info")
    logger.warning(f"Test Message from logger.warning")
    logger.error(f"Test Message from logger.error")
    logger.critical(f"Test Message from logger.critical")

This code will log the messages to both the console and the json file.

You can use custom formats for the message or the provided formats in the logging.formatters.Format enum.

### utils
Utils are a group of functions that are nice to have ready for you.
Note: the functions currently in the package are meant to be used as a decorator.
Example:

    @threaded
    def treaded_function():
        # some code

Now, `threaded_function` will start in a new thread whenever called.

### enums
This package is a place where I put enums that I might use in the future.
Currently, it has one enum called `AnsiColor` which contains some of the colors used in the console.
Example:

    print(AnsiColor.red.value + "Example Error Text." + AnsiColor.reset.value)

## Contact Me!
If you have any suggestions to add to the library you can [email me](mailto:asem.sh2004@gmail.com). 
I am open to any constructive criticism!
            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "photonic",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "Asem Shouman <asem.sh2004@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/7e/84/ffd9ae89dcf8fdff01a723a0d680a3c49e539f9eba7ed7663766043c1985/photonic-0.0.1.tar.gz",
    "platform": null,
    "description": "# Photonic Utilities Library\n## Description\nPhotonic is the library where I upload all my neat tools!\n\n### _logging\nThis package is designed to make logging easier and customizable.  \n\n**Quick start:**  \n1) You need to configure your logger before using it, here is an example:\n\n\n    logger_name = \"my_logger\"\n\n    console_config(logger_name)  # This makes the logger log to the console (with colors)!\n    json_file_config(logger_name)  # This makes the logger log to a json file (more detailed too).\n\n2) Now, we are all set! To use the logger all you need to do is:\n\n\n    logger = getLogger(\"my_logger\")\n\n    logger.debug(f\"Test Message from logger.debug\")\n    logger.info(f\"Test Message from logger.info\")\n    logger.warning(f\"Test Message from logger.warning\")\n    logger.error(f\"Test Message from logger.error\")\n    logger.critical(f\"Test Message from logger.critical\")\n\nThis code will log the messages to both the console and the json file.\n\nYou can use custom formats for the message or the provided formats in the logging.formatters.Format enum.\n\n### utils\nUtils are a group of functions that are nice to have ready for you.\nNote: the functions currently in the package are meant to be used as a decorator.\nExample:\n\n    @threaded\n    def treaded_function():\n        # some code\n\nNow, `threaded_function` will start in a new thread whenever called.\n\n### enums\nThis package is a place where I put enums that I might use in the future.\nCurrently, it has one enum called `AnsiColor` which contains some of the colors used in the console.\nExample:\n\n    print(AnsiColor.red.value + \"Example Error Text.\" + AnsiColor.reset.value)\n\n## Contact Me!\nIf you have any suggestions to add to the library you can [email me](mailto:asem.sh2004@gmail.com). \nI am open to any constructive criticism!",
    "bugtrack_url": null,
    "license": "",
    "summary": "My neat tools grouped together!",
    "version": "0.0.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/Asem1090/photonic/issues",
        "Homepage": "https://github.com/Asem1090/photonic"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6c2b02eaebf00437a2344368ec1197446a22f30c1c5aee6f67b91fbf5cab6b4f",
                "md5": "6237621dc4e873e1ac31627236f296bd",
                "sha256": "6c8facba070a70e72c00b56ae5db496882bfcf9634eaec706e2b39b5c4426285"
            },
            "downloads": -1,
            "filename": "photonic-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6237621dc4e873e1ac31627236f296bd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 11503,
            "upload_time": "2023-10-11T18:41:43",
            "upload_time_iso_8601": "2023-10-11T18:41:43.279471Z",
            "url": "https://files.pythonhosted.org/packages/6c/2b/02eaebf00437a2344368ec1197446a22f30c1c5aee6f67b91fbf5cab6b4f/photonic-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7e84ffd9ae89dcf8fdff01a723a0d680a3c49e539f9eba7ed7663766043c1985",
                "md5": "62e7e6277fa294ad84a12a9f29de997c",
                "sha256": "0453829a3c4a5555b08cde0a0b5f1d8e4d68385576d06a5f83f9be53b49e54a0"
            },
            "downloads": -1,
            "filename": "photonic-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "62e7e6277fa294ad84a12a9f29de997c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4196094,
            "upload_time": "2023-10-11T18:41:46",
            "upload_time_iso_8601": "2023-10-11T18:41:46.905571Z",
            "url": "https://files.pythonhosted.org/packages/7e/84/ffd9ae89dcf8fdff01a723a0d680a3c49e539f9eba7ed7663766043c1985/photonic-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-11 18:41:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Asem1090",
    "github_project": "photonic",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "photonic"
}
        
Elapsed time: 0.12170s