pyroscope-io


Namepyroscope-io JSON
Version 0.8.6 PyPI version JSON
download
home_pagehttps://pyroscope.io
SummaryPyroscope Python integration
upload_time2024-04-09 04:21:06
maintainerAbid Omar
docs_urlNone
authorNone
requires_pythonNone
licenseApache 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pyroscope Python Package

**Pyroscope integration for Python**

[![license](https://img.shields.io/badge/license-Apache2.0-blue.svg)](LICENSE) 
![tests](https://github.com/pyroscope-io/pyroscope-rs/workflows/Tests/badge.svg)
![build](https://github.com/pyroscope-io/pyroscope-rs/workflows/Build/badge.svg)
[![PyPI version](https://badge.fury.io/py/pyroscope-io.svg)](https://badge.fury.io/py/pyroscope-io)
[![PyPI](https://img.shields.io/pypi/pyversions/pyroscope-io.svg?maxAge=2592000)](https://pypi.python.org/pypi/pyroscope-io)


---

### What is Pyroscope
[Pyroscope](https://github.com/pyroscope-io/pyroscope) is a tool that lets you continuously profile your applications to prevent and debug performance issues in your code. It consists of a low-overhead agent which sends data to the Pyroscope server which includes a custom-built storage engine. This allows for you to store and query any applications profiling data in an extremely efficient and cost effective way.


### How to install Pyroscope for Python Applications
```
pip install pyroscope-io
```

### Minimal Configuration

Add the following code to your application. This code will initialize pyroscope profiler and start profiling:

```python
import pyroscope

pyroscope.configure(
  application_name = "my.python.app", # replace this with some name for your application
  server_address   = "http://my-pyroscope-server:4040", # replace this with the address of your pyroscope server
)
```

### Full Configuration

Optionally, you can configure several parameters:

```python
import pyroscope

pyroscope.configure(
  application_name    = "my.python.app", # replace this with some name for your application
  server_address      = "http://my-pyroscope-server:4040", # replace this with the address of your pyroscope server
  auth_token          = "{YOUR_API_KEY}", # optional, if authentication is enabled, specify the API key
  sample_rate         = 100, # default is 100
  detect_subprocesses = False, # detect subprocesses started by the main process; default is False
  oncpu               = True # report cpu time only; default is True
  gil_only            = True # only include traces for threads that are holding on to the Global Interpreter Lock; default is True
  log_level           = "info" # default is info, possible values: trace, debug, info, warn, error and critical 
  tags           = {
    "region":   '{os.getenv("REGION")}',
  }
)

```

### Tags

You can add tags to certain parts of your code:

```python
# You can use a wrapper:
with pyroscope.tag_wrapper({ "controller": "slow_controller_i_want_to_profile" }):
  slow_code()
```

### Example

Check out this [example python project in our repository](https://github.com/pyroscope-io/pyroscope/tree/main/examples/python) for examples of how you can use these features.

            

Raw data

            {
    "_id": null,
    "home_page": "https://pyroscope.io",
    "name": "pyroscope-io",
    "maintainer": "Abid Omar",
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": "contact@pyroscope.io",
    "keywords": null,
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/ba/0a/687732da0daead5bf1773127606cd0ea7565638879acbd2d7a42d6a5054b/pyroscope-io-0.8.6.tar.gz",
    "platform": "any",
    "description": "# Pyroscope Python Package\n\n**Pyroscope integration for Python**\n\n[![license](https://img.shields.io/badge/license-Apache2.0-blue.svg)](LICENSE) \n![tests](https://github.com/pyroscope-io/pyroscope-rs/workflows/Tests/badge.svg)\n![build](https://github.com/pyroscope-io/pyroscope-rs/workflows/Build/badge.svg)\n[![PyPI version](https://badge.fury.io/py/pyroscope-io.svg)](https://badge.fury.io/py/pyroscope-io)\n[![PyPI](https://img.shields.io/pypi/pyversions/pyroscope-io.svg?maxAge=2592000)](https://pypi.python.org/pypi/pyroscope-io)\n\n\n---\n\n### What is Pyroscope\n[Pyroscope](https://github.com/pyroscope-io/pyroscope) is a tool that lets you continuously profile your applications to prevent and debug performance issues in your code. It consists of a low-overhead agent which sends data to the Pyroscope server which includes a custom-built storage engine. This allows for you to store and query any applications profiling data in an extremely efficient and cost effective way.\n\n\n### How to install Pyroscope for Python Applications\n```\npip install pyroscope-io\n```\n\n### Minimal Configuration\n\nAdd the following code to your application. This code will initialize pyroscope profiler and start profiling:\n\n```python\nimport pyroscope\n\npyroscope.configure(\n  application_name = \"my.python.app\", # replace this with some name for your application\n  server_address   = \"http://my-pyroscope-server:4040\", # replace this with the address of your pyroscope server\n)\n```\n\n### Full Configuration\n\nOptionally, you can configure several parameters:\n\n```python\nimport pyroscope\n\npyroscope.configure(\n  application_name    = \"my.python.app\", # replace this with some name for your application\n  server_address      = \"http://my-pyroscope-server:4040\", # replace this with the address of your pyroscope server\n  auth_token          = \"{YOUR_API_KEY}\", # optional, if authentication is enabled, specify the API key\n  sample_rate         = 100, # default is 100\n  detect_subprocesses = False, # detect subprocesses started by the main process; default is False\n  oncpu               = True # report cpu time only; default is True\n  gil_only            = True # only include traces for threads that are holding on to the Global Interpreter Lock; default is True\n  log_level           = \"info\" # default is info, possible values: trace, debug, info, warn, error and critical \n  tags           = {\n    \"region\":   '{os.getenv(\"REGION\")}',\n  }\n)\n\n```\n\n### Tags\n\nYou can add tags to certain parts of your code:\n\n```python\n# You can use a wrapper:\nwith pyroscope.tag_wrapper({ \"controller\": \"slow_controller_i_want_to_profile\" }):\n  slow_code()\n```\n\n### Example\n\nCheck out this [example python project in our repository](https://github.com/pyroscope-io/pyroscope/tree/main/examples/python) for examples of how you can use these features.\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Pyroscope Python integration",
    "version": "0.8.6",
    "project_urls": {
        "Bug Tracker": "https://pyroscope.io",
        "Changelog": "https://pyroscope.io",
        "Discussions": "https://pyroscope.io",
        "Documentation": "https://pyroscope.io",
        "Homepage": "https://pyroscope.io"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dad8cc7f26637a214787ec821822ed627e703256ba4f30524cfda0191b69e77a",
                "md5": "49cf70449d6f7d325741a925d9794109",
                "sha256": "cf995ef58bbfacb43d252c25ba268c98fb199cb90c699df86cb633c4f95c93b2"
            },
            "downloads": -1,
            "filename": "pyroscope_io-0.8.6-py2.py3-none-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "49cf70449d6f7d325741a925d9794109",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 2618749,
            "upload_time": "2024-04-09T04:20:57",
            "upload_time_iso_8601": "2024-04-09T04:20:57.691335Z",
            "url": "https://files.pythonhosted.org/packages/da/d8/cc7f26637a214787ec821822ed627e703256ba4f30524cfda0191b69e77a/pyroscope_io-0.8.6-py2.py3-none-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "58b0b234a56499bd8d7e915f04a875e5894cfe3581394c3602c33d4aa5231ad1",
                "md5": "ae7b51beff2830e75660b594680ee398",
                "sha256": "bf66bcbf979d68120d70fa94991de34a94a968a6442e2d7f54f83ec66ab27bfc"
            },
            "downloads": -1,
            "filename": "pyroscope_io-0.8.6-py2.py3-none-macosx_11_0_x86_64.whl",
            "has_sig": false,
            "md5_digest": "ae7b51beff2830e75660b594680ee398",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 2618750,
            "upload_time": "2024-04-09T04:21:00",
            "upload_time_iso_8601": "2024-04-09T04:21:00.011465Z",
            "url": "https://files.pythonhosted.org/packages/58/b0/b234a56499bd8d7e915f04a875e5894cfe3581394c3602c33d4aa5231ad1/pyroscope_io-0.8.6-py2.py3-none-macosx_11_0_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "45758cf1a012752372bf05791c3ece9a1463fbcc75cd45f5d2b359f74c8fb321",
                "md5": "a17d39f73adda954d20912f46b7f765a",
                "sha256": "eaa3e3d6c09b4f2c527ddf290bce95b4a5f44c90e7a9892da31b57a33d72dd30"
            },
            "downloads": -1,
            "filename": "pyroscope_io-0.8.6-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "a17d39f73adda954d20912f46b7f765a",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 3266364,
            "upload_time": "2024-04-09T04:21:02",
            "upload_time_iso_8601": "2024-04-09T04:21:02.167924Z",
            "url": "https://files.pythonhosted.org/packages/45/75/8cf1a012752372bf05791c3ece9a1463fbcc75cd45f5d2b359f74c8fb321/pyroscope_io-0.8.6-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f606303bdd1763d73e3b9dcd9f9e77513a9feadde9fc95f4f7b48c69818e40b5",
                "md5": "b24f4060aec64ba2e2dbd1fdab42c776",
                "sha256": "a75c219186a7e1cf79200400b45e0b6b27c2cd85cc646013217048cb59e6bece"
            },
            "downloads": -1,
            "filename": "pyroscope_io-0.8.6-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "b24f4060aec64ba2e2dbd1fdab42c776",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 4318483,
            "upload_time": "2024-04-09T04:21:04",
            "upload_time_iso_8601": "2024-04-09T04:21:04.273419Z",
            "url": "https://files.pythonhosted.org/packages/f6/06/303bdd1763d73e3b9dcd9f9e77513a9feadde9fc95f4f7b48c69818e40b5/pyroscope_io-0.8.6-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ba0a687732da0daead5bf1773127606cd0ea7565638879acbd2d7a42d6a5054b",
                "md5": "f9572bbb218c56ddc975839cfa5393a7",
                "sha256": "75695647afd9fa8f2fefed730ad58897ce3e9da43b7f285592c01005620d75fe"
            },
            "downloads": -1,
            "filename": "pyroscope-io-0.8.6.tar.gz",
            "has_sig": false,
            "md5_digest": "f9572bbb218c56ddc975839cfa5393a7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 12495,
            "upload_time": "2024-04-09T04:21:06",
            "upload_time_iso_8601": "2024-04-09T04:21:06.415468Z",
            "url": "https://files.pythonhosted.org/packages/ba/0a/687732da0daead5bf1773127606cd0ea7565638879acbd2d7a42d6a5054b/pyroscope-io-0.8.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-09 04:21:06",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pyroscope-io"
}
        
Elapsed time: 0.33674s