# Introduction
This is a package for profiling your code, and use it to better understand what is happening in your code and debug better.
This is availale to use in any python code (no framework specific).
# Profilers
There is `Main Profiler` Which will register all profilers and responsible for handling issues and reporting info.
### Currently Supported Profilers
* MySQLProfiler
# Integrations
For the ease of development, we added some integrations which will take the `Main Profiler` and handle the integration with other frameworks.
Also you could use profilers without integrations, but you will write more code.
### Currently Supported Integrations
* Flask
* It is used for integrating profilers with flask with only few code
# Examples
This is an example for using MySQL Profiler With Flask
```python
from flask import Flask
from code_profilers.main_profiler import MainProfiler
from code_profilers.profilers.mysql.profiler import MySQLProfiler
from code_profilers.integrations.flask import FlaskIntegration
app = Flask(__name__)
profiler = MainProfiler()
profiler.register_profiler(MySQLProfiler())
FlaskIntegration(app, profiler)
```
Then you are ready to go and test your code
Raw data
{
"_id": null,
"home_page": "https://github.com/Code-Profilers/base",
"name": "code-profilers",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "python, profilers, profiler",
"author": "Hady Eslam",
"author_email": "abdoaslam000@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/a9/bd/63ea6238f5c18c946c3ec1d75cec3a4a6596b683d263fc6519d89fd86733/code_profilers-1.0.0.tar.gz",
"platform": null,
"description": "# Introduction\nThis is a package for profiling your code, and use it to better understand what is happening in your code and debug better.\nThis is availale to use in any python code (no framework specific).\n\n\n# Profilers\nThere is `Main Profiler` Which will register all profilers and responsible for handling issues and reporting info.\n\n### Currently Supported Profilers\n* MySQLProfiler\n\n# Integrations\nFor the ease of development, we added some integrations which will take the `Main Profiler` and handle the integration with other frameworks.\nAlso you could use profilers without integrations, but you will write more code.\n\n\n### Currently Supported Integrations\n* Flask\n * It is used for integrating profilers with flask with only few code\n\n\n# Examples\nThis is an example for using MySQL Profiler With Flask\n```python\nfrom flask import Flask\n\nfrom code_profilers.main_profiler import MainProfiler\nfrom code_profilers.profilers.mysql.profiler import MySQLProfiler\nfrom code_profilers.integrations.flask import FlaskIntegration\n\napp = Flask(__name__)\n\nprofiler = MainProfiler()\nprofiler.register_profiler(MySQLProfiler())\nFlaskIntegration(app, profiler)\n```\nThen you are ready to go and test your code\n",
"bugtrack_url": null,
"license": null,
"summary": "# Introduction",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/Code-Profilers/base"
},
"split_keywords": [
"python",
" profilers",
" profiler"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "c6602e66a01223f25127813e19288009c8d506a9fae9378c4c81d978f6a419e5",
"md5": "fd8b6b90393884498ce17664ca66bbff",
"sha256": "857155812ee33ea644df09d0e3e299f78285e2bcfe512e0b5340655336ea9a93"
},
"downloads": -1,
"filename": "code_profilers-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fd8b6b90393884498ce17664ca66bbff",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 9397,
"upload_time": "2025-01-29T11:57:58",
"upload_time_iso_8601": "2025-01-29T11:57:58.282491Z",
"url": "https://files.pythonhosted.org/packages/c6/60/2e66a01223f25127813e19288009c8d506a9fae9378c4c81d978f6a419e5/code_profilers-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "a9bd63ea6238f5c18c946c3ec1d75cec3a4a6596b683d263fc6519d89fd86733",
"md5": "842b25b14a9976f1815b9bbf9725c396",
"sha256": "b54fb9c3fd36ba5177185918c2e0ee3e96f2e561bbb7e83a4c3ec8b3200fc194"
},
"downloads": -1,
"filename": "code_profilers-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "842b25b14a9976f1815b9bbf9725c396",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7270,
"upload_time": "2025-01-29T11:58:05",
"upload_time_iso_8601": "2025-01-29T11:58:05.998552Z",
"url": "https://files.pythonhosted.org/packages/a9/bd/63ea6238f5c18c946c3ec1d75cec3a4a6596b683d263fc6519d89fd86733/code_profilers-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-29 11:58:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Code-Profilers",
"github_project": "base",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "code-profilers"
}