{"id":19005483,"url":"https://github.com/anuja-rahul/python_datalogger","last_synced_at":"2025-02-21T14:17:59.970Z","repository":{"id":217636169,"uuid":"744393926","full_name":"anuja-rahul/python_datalogger","owner":"anuja-rahul","description":"simplified datalogger using python for easier/faster data logging, debugging and error handling.","archived":false,"fork":false,"pushed_at":"2024-02-09T07:33:36.000Z","size":89,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-01T19:28:53.312Z","etag":null,"topics":["easy-to-use","logging-library","python-package"],"latest_commit_sha":null,"homepage":"https://test.pypi.org/project/python-datalogger/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anuja-rahul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-17T07:58:06.000Z","updated_at":"2024-04-16T16:10:07.000Z","dependencies_parsed_at":"2024-02-09T08:30:13.398Z","dependency_job_id":"a9e01f0d-159a-4d77-8d37-a61ec7d71ec1","html_url":"https://github.com/anuja-rahul/python_datalogger","commit_stats":null,"previous_names":["anuja-rahul/python_datalogger"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anuja-rahul%2Fpython_datalogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anuja-rahul%2Fpython_datalogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anuja-rahul%2Fpython_datalogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anuja-rahul%2Fpython_datalogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anuja-rahul","download_url":"https://codeload.github.com/anuja-rahul/python_datalogger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240027430,"owners_count":19736212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["easy-to-use","logging-library","python-package"],"created_at":"2024-11-08T18:27:43.677Z","updated_at":"2025-02-21T14:17:59.945Z","avatar_url":"https://github.com/anuja-rahul.png","language":"Python","readme":"## python_datalogger (v0.0.4)\n#### Simplified datalogger using python for easier and faster data logging.\n\n    Datalogger will save all the recorded logs in a local directory (./logs)\n\n## How to install datalogger from test-pypi\n\n#### Visit :\n[https://test.pypi.org/project/python-datalogger/](https://test.pypi.org/project/python-datalogger/)\n    \n#### Or run on your terminal :\n    pip install -i https://test.pypi.org/simple/ python-datalogger\n\n\n## How to install datalogger locally\n\n    01. Download this project.\n    02. Extract the master zip file\n    03. Open command prompt in the master folder location\n    04. Run (for windows) -\u003e pip install . \n        Run (for mac)     -\u003e pip3 install .\n\n    Now you can use datalogger locally any time you want\n\n\n### How to use Datalogger.logger decorator for basic exception handling. (Example):\n```python\n\nfrom python_datalogger import DataLogger\n\n\n# using datalogger decorator to record basic exceptions\n@DataLogger.logger\ndef test_method(num: int) -\u003e float:\n    return 1000/num\n\n\ntest_method(2)  # if no exceptions are encountered, logs the time taken for this method to run\n\n# raises ZeroDivisionError for demonstration\ntest_method(0) # logs the error, in case of an exception\n\n```\n\n### How to use Datalogger.timeit decorator to time a function runtime. (Example):\n```python\nfrom python_datalogger import DataLogger\n\n@DataLogger.timeit\ndef test_method(num: int) -\u003e float:\n    return 1000/num\n\ntest_method(10) # displays the runtime before returning the result for test_method\n```\n\n### How to use datalogger for specific info logging. (Example):\n```python\n\nfrom python_datalogger import DataLogger\n    \n\nlogger = DataLogger(name=\"TestLogger\", level=\"DEBUG\", propagate=True)\n\n# name can be any name you like for the current instance of the Datalogger\n# level has 5 security options (DEBUG, INFO, WARNING, ERROR, CRITICAL)\n# propagate has 2 options (True/False), if true, the current log is displayed on the terminal\n\n\ndef test_method():\n    try:\n        print(\"Starting to do something !\")\n\n        # logs a regular information log\n        logger.log_info(\"test_method did something !\")\n\n    except Exception as exception:\n\n        # in case of an exception, logs an error log containing the specified exception\n        logger.log_error(str(exception))\n\ntest_method()\n\n```\n\n\n### There are 5 possible types of logging methods you can use for each security level.\n\n```python\nfrom python_datalogger import DataLogger\n\nlogger = DataLogger(name=\"TestLogger\", level=\"DEBUG\", propagate=True)\n    \nlogger.log_debug(info=\"this is a debug log\")\nlogger.log_info(info=\"this is an info log\")\nlogger.log_warning(info=\"this is a warning log\")\nlogger.log_error(info=\"this is an error log\")\nlogger.log_critical(info=\"this is a critical log\")\n\n\"\"\"Each of these methods accept one (string) parameter containing the information you want to log.\"\"\"\n\n```\n    \n    \n    \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanuja-rahul%2Fpython_datalogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanuja-rahul%2Fpython_datalogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanuja-rahul%2Fpython_datalogger/lists"}