Metadata-Version: 2.2
Name: nvtx
Version: 0.2.11
Summary: PyNVTX - Python code annotation library
Author: NVIDIA Corporation
License: Apache 2.0
Project-URL: Homepage, https://github.com/NVIDIA/NVTX
Project-URL: Documentation, https://github.com/NVIDIA/NVTX/blob/release-v3/python/docs/index.rst
Project-URL: Repository, https://github.com/NVIDIA/NVTX
Project-URL: License, https://nvidia.github.io/NVTX/LICENSE.txt
Project-URL: Issues, https://github.com/NVIDIA/NVTX/issues
Classifier: Intended Audience :: Developers
Classifier: Topic :: Database
Classifier: Topic :: Scientific/Engineering
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: Cython==3.0.11; extra == "test"
Requires-Dist: setuptools; extra == "test"

# nvtx Python package

## Installation

Install using conda:
```
conda install -c conda-forge nvtx
```

...or using pip:
```
python -m pip install nvtx
```

## Quick start

1. Annotate the parts of your Python code you wish to profile/analyze:
   
   ```python
   # demo.py

   import time
   import nvtx

   @nvtx.annotate(color="blue")
   def my_function():
       for i in range(5):
           with nvtx.annotate("my_loop", color="red"):
               time.sleep(i)

   my_function()
   ```

2. Use [NVIDIA Nsight Systems](https://developer.nvidia.com/nsight-systems) to
   collect profile data:

   ```
   nsys profile -t nvtx python demo.py
   ```
   
3. Visualize the results using the Nsight systems GUI:

   ![demo](https://raw.githubusercontent.com/NVIDIA/NVTX/release-v3/docs/images/example_range.png)

## Documentation

See [here](https://github.com/NVIDIA/NVTX/blob/release-v3/python/docs/index.rst) for detailed docs.
