# Vedro Import Profiler
Vedro Import Profiler allows you to profile your imports in [Vedro](https://vedro.io) projects, helping you identify and optimize import statements for better performance.
## Installation
To get started, you first need to install the [vedro-import-profiler](https://pypi.org/project/vedro-import-profiler/) plugin. Open your terminal and run the following command:
```shell
$ pip install vedro-import-profiler
```
## Enabling the Plugin Temporarily
Once installed, you can temporarily enable the Vedro Import Profiler for your current session. Additionally, you may need to disable the `assert_rewriter` plugin to avoid conflicts. Run these commands in your terminal:
```shell
$ vedro plugins enable vedro-import-profiler
$ vedro plugins disable vedro.plugins.assert_rewriter
```
## Running the Profiler
To run the profiler and generate a log of your import times, use the command below. Make sure to prepend `PYTHONPROFILEIMPORTTIME=yes` to capture the necessary data:
```shell
$ PYTHONPROFILEIMPORTTIME=yes vedro run --vedro-import-profiler 2> import.log
```
## Visualizing Import Times
After running the profiler, you can visualize the import times using the [tuna](https://github.com/nschloe/tuna) viewer. Tuna provides an intuitive interface for analyzing the performance of your imports. To use Tuna with your generated log file, execute the following command:
```shell
$ tuna import.log
```
Raw data
{
"_id": null,
"home_page": "https://github.com/vedro-universe/vedro-import-profiler",
"name": "vedro-import-profiler",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "",
"author": "Nikita Tsvetkov",
"author_email": "tsv1@fastmail.com",
"download_url": "https://files.pythonhosted.org/packages/71/26/7472f3a6bd5c3c1e3ec818495d54162ab2a2efc44e863c58a03cc503696b/vedro-import-profiler-0.0.2.tar.gz",
"platform": null,
"description": "# Vedro Import Profiler\n\nVedro Import Profiler allows you to profile your imports in [Vedro](https://vedro.io) projects, helping you identify and optimize import statements for better performance.\n\n## Installation\n\nTo get started, you first need to install the [vedro-import-profiler](https://pypi.org/project/vedro-import-profiler/) plugin. Open your terminal and run the following command:\n\n```shell\n$ pip install vedro-import-profiler\n```\n\n## Enabling the Plugin Temporarily\n\nOnce installed, you can temporarily enable the Vedro Import Profiler for your current session. Additionally, you may need to disable the `assert_rewriter` plugin to avoid conflicts. Run these commands in your terminal:\n\n```shell\n$ vedro plugins enable vedro-import-profiler\n$ vedro plugins disable vedro.plugins.assert_rewriter\n```\n\n## Running the Profiler\n\nTo run the profiler and generate a log of your import times, use the command below. Make sure to prepend `PYTHONPROFILEIMPORTTIME=yes` to capture the necessary data:\n\n```shell\n$ PYTHONPROFILEIMPORTTIME=yes vedro run --vedro-import-profiler 2> import.log\n```\n\n## Visualizing Import Times\n\nAfter running the profiler, you can visualize the import times using the [tuna](https://github.com/nschloe/tuna) viewer. Tuna provides an intuitive interface for analyzing the performance of your imports. To use Tuna with your generated log file, execute the following command:\n\n```shell\n$ tuna import.log\n```\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Import profiler for Vedro framework",
"version": "0.0.2",
"project_urls": {
"GitHub": "https://github.com/vedro-universe/vedro-import-profiler",
"Homepage": "https://github.com/vedro-universe/vedro-import-profiler"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c386bc844c02a96a4d467abf282cf50dad313f4885e6a4088da38180fda55af0",
"md5": "09af746b1e6a52c34903c35a29dbe053",
"sha256": "77a32558e54df7d73617ca5afcbb2260595ed63210208a85b6d8f09490927a44"
},
"downloads": -1,
"filename": "vedro_import_profiler-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "09af746b1e6a52c34903c35a29dbe053",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 8036,
"upload_time": "2024-03-11T15:18:01",
"upload_time_iso_8601": "2024-03-11T15:18:01.595575Z",
"url": "https://files.pythonhosted.org/packages/c3/86/bc844c02a96a4d467abf282cf50dad313f4885e6a4088da38180fda55af0/vedro_import_profiler-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "71267472f3a6bd5c3c1e3ec818495d54162ab2a2efc44e863c58a03cc503696b",
"md5": "659813725e6db563d6df3800130609d0",
"sha256": "126f8c6452c645cb91fa878bcd56a4e6aec4fcb3666c5e28038f14f0118463d7"
},
"downloads": -1,
"filename": "vedro-import-profiler-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "659813725e6db563d6df3800130609d0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 7510,
"upload_time": "2024-03-11T15:18:03",
"upload_time_iso_8601": "2024-03-11T15:18:03.291790Z",
"url": "https://files.pythonhosted.org/packages/71/26/7472f3a6bd5c3c1e3ec818495d54162ab2a2efc44e863c58a03cc503696b/vedro-import-profiler-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-11 15:18:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "vedro-universe",
"github_project": "vedro-import-profiler",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "vedro",
"specs": [
[
"<",
"2.0"
],
[
">=",
"1.11"
]
]
}
],
"lcname": "vedro-import-profiler"
}