cavisson-pythonagent 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cavisson_pythonagent-0.0.1.dist-info/METADATA +32 -0
- cavisson_pythonagent-0.0.1.dist-info/RECORD +180 -0
- cavisson_pythonagent-0.0.1.dist-info/WHEEL +5 -0
- cavisson_pythonagent-0.0.1.dist-info/licenses/LICENSE +19 -0
- cavisson_pythonagent-0.0.1.dist-info/top_level.txt +1 -0
- pythonagent/__init__.py +22 -0
- pythonagent/agent/__init__.py +219 -0
- pythonagent/agent/internal/__init__.py +1 -0
- pythonagent/agent/internal/agent.py +1651 -0
- pythonagent/agent/internal/framesinfo.py +152 -0
- pythonagent/agent/internal/heap_dump.py +39 -0
- pythonagent/agent/internal/intercept_module.py +70 -0
- pythonagent/agent/internal/logs.py +122 -0
- pythonagent/agent/internal/metadata/__init__.py +0 -0
- pythonagent/agent/internal/metadata/agent_meta_data.py +276 -0
- pythonagent/agent/internal/proc_compat.py +75 -0
- pythonagent/agent/internal/profile.py +47 -0
- pythonagent/agent/internal/provider.py +83 -0
- pythonagent/agent/internal/thread_dump.py +85 -0
- pythonagent/agent/internal/udp.py +245 -0
- pythonagent/agent/internal/udp_message.py +800 -0
- pythonagent/agent/probes/Instrumentation/__init__.py +340 -0
- pythonagent/agent/probes/Instrumentation/find.py +243 -0
- pythonagent/agent/probes/Instrumentation/module_version_resolver.py +155 -0
- pythonagent/agent/probes/Instrumentation/new_parser.py +64 -0
- pythonagent/agent/probes/Instrumentation/parser.py +129 -0
- pythonagent/agent/probes/__init__.py +219 -0
- pythonagent/agent/probes/base.py +303 -0
- pythonagent/agent/probes/cache/__init__.py +51 -0
- pythonagent/agent/probes/cache/redis.py +119 -0
- pythonagent/agent/probes/cache/redis_asyncio.py +83 -0
- pythonagent/agent/probes/coroutines/__init__.py +1 -0
- pythonagent/agent/probes/coroutines/asyncio.py +63 -0
- pythonagent/agent/probes/elasticdb/__init__.py +7 -0
- pythonagent/agent/probes/elasticdb/aelastic.py +54 -0
- pythonagent/agent/probes/frameworks/__init__.py +27 -0
- pythonagent/agent/probes/frameworks/agentprofiler.py +105 -0
- pythonagent/agent/probes/frameworks/aiohttp_web.py +155 -0
- pythonagent/agent/probes/frameworks/aisess.py +151 -0
- pythonagent/agent/probes/frameworks/asgi.py +340 -0
- pythonagent/agent/probes/frameworks/bottle.py +27 -0
- pythonagent/agent/probes/frameworks/cherry.py +25 -0
- pythonagent/agent/probes/frameworks/django.py +128 -0
- pythonagent/agent/probes/frameworks/falcon.py +21 -0
- pythonagent/agent/probes/frameworks/fastapi.py +35 -0
- pythonagent/agent/probes/frameworks/flask.py +30 -0
- pythonagent/agent/probes/frameworks/pyramid.py +56 -0
- pythonagent/agent/probes/frameworks/test.py +108 -0
- pythonagent/agent/probes/frameworks/tornado_async_web.py +117 -0
- pythonagent/agent/probes/frameworks/tornado_web.py +133 -0
- pythonagent/agent/probes/frameworks/wsgi.py +353 -0
- pythonagent/agent/probes/grpc/__init__.py +76 -0
- pythonagent/agent/probes/grpc/client_interceptor.py +132 -0
- pythonagent/agent/probes/grpc/server_interceptor.py +129 -0
- pythonagent/agent/probes/havoc/__init__.py +0 -0
- pythonagent/agent/probes/havoc/custom_memory_stress.py +186 -0
- pythonagent/agent/probes/havoc/custom_thread_stress.py +187 -0
- pythonagent/agent/probes/havoc/havoc_constants.py +218 -0
- pythonagent/agent/probes/havoc/havoc_manager.py +981 -0
- pythonagent/agent/probes/http/__init__.py +49 -0
- pythonagent/agent/probes/http/aiohttp_client.py +59 -0
- pythonagent/agent/probes/http/boto.py +12 -0
- pythonagent/agent/probes/http/httplib.py +110 -0
- pythonagent/agent/probes/http/httpx_client.py +116 -0
- pythonagent/agent/probes/http/requests.py +15 -0
- pythonagent/agent/probes/http/tornado_httpclient.py +85 -0
- pythonagent/agent/probes/http/urllib3.py +16 -0
- pythonagent/agent/probes/langchain/__init__.py +21 -0
- pythonagent/agent/probes/langchain/base_tool.py +95 -0
- pythonagent/agent/probes/langchain/langchain_community.py +136 -0
- pythonagent/agent/probes/langchain/langchain_core.py +32 -0
- pythonagent/agent/probes/langchain/langchain_openai.py +110 -0
- pythonagent/agent/probes/logging/__init__.py +106 -0
- pythonagent/agent/probes/message_brokers/__init__.py +4 -0
- pythonagent/agent/probes/message_brokers/pika.py +126 -0
- pythonagent/agent/probes/mongodb/__init__.py +6 -0
- pythonagent/agent/probes/mongodb/pymongo.py +286 -0
- pythonagent/agent/probes/openai/__init__.py +3 -0
- pythonagent/agent/probes/openai/openai.py +797 -0
- pythonagent/agent/probes/span.py +101 -0
- pythonagent/agent/probes/sql/__init__.py +13 -0
- pythonagent/agent/probes/sql/botocores3.py +51 -0
- pythonagent/agent/probes/sql/dbapi.py +285 -0
- pythonagent/agent/probes/sql/dynamodb.py +90 -0
- pythonagent/agent/probes/sql/mysql_connector.py +24 -0
- pythonagent/agent/probes/sql/mysql_connector_cext.py +24 -0
- pythonagent/agent/probes/sql/mysqldb.py +43 -0
- pythonagent/agent/probes/sql/psycopg2.py +174 -0
- pythonagent/agent/probes/sql/pymysql.py +25 -0
- pythonagent/bootstrap/__init__.py +0 -0
- pythonagent/bootstrap/cav_gunicorn.py +26 -0
- pythonagent/bootstrap/cavagent_lambda_wrapper.py +291 -0
- pythonagent/bootstrap/run.py +47 -0
- pythonagent/bootstrap/sitecustomize.py +287 -0
- pythonagent/cavisson/netdiagnostics/CavAgent/instrumentationprofile.json +26 -0
- pythonagent/cavisson/netdiagnostics/CavAgent/interceptor_points.txt +29 -0
- pythonagent/cavisson/netdiagnostics/python/CavAgent/instrumentationprofile.json +42 -0
- pythonagent/cavisson/netdiagnostics/python/CavAgent/interceptor_points.txt +29 -0
- pythonagent/cavisson/netdiagnostics/python/config/ndsettings.conf +6 -0
- pythonagent/config.py +279 -0
- pythonagent/find.py +72 -0
- pythonagent/find_mod_cls_name.py +54 -0
- pythonagent/lang.py +131 -0
- pythonagent/lib.py +91 -0
- pythonagent/main/__init__.py +0 -0
- pythonagent/main/pytrace/__init__.py +79 -0
- pythonagent/main/pytrace/commands/__init__.py +0 -0
- pythonagent/main/pytrace/commands/auto_discovery.py +25 -0
- pythonagent/main/pytrace/commands/run.py +401 -0
- pythonagent/main/pytrace/pytrace.py +133 -0
- pythonagent/main/wsgi.py +6 -0
- pythonagent/main.py +27 -0
- pythonagent/run.py +46 -0
- pythonagent/sqins.py +8 -0
- pythonagent/test.py +73 -0
- pythonagent/utils.py +168 -0
- pythonagent/vendor/__init__.py +0 -0
- pythonagent/vendor/pympler/__init__.py +1 -0
- pythonagent/vendor/pympler/asizeof.py +2810 -0
- pythonagent/vendor/pympler/charts.py +62 -0
- pythonagent/vendor/pympler/classtracker.py +590 -0
- pythonagent/vendor/pympler/classtracker_stats.py +780 -0
- pythonagent/vendor/pympler/garbagegraph.py +80 -0
- pythonagent/vendor/pympler/mprofile.py +97 -0
- pythonagent/vendor/pympler/muppy.py +275 -0
- pythonagent/vendor/pympler/panels.py +115 -0
- pythonagent/vendor/pympler/process.py +238 -0
- pythonagent/vendor/pympler/py.typed +0 -0
- pythonagent/vendor/pympler/refbrowser.py +451 -0
- pythonagent/vendor/pympler/refgraph.py +350 -0
- pythonagent/vendor/pympler/summary.py +321 -0
- pythonagent/vendor/pympler/tracker.py +267 -0
- pythonagent/vendor/pympler/util/__init__.py +0 -0
- pythonagent/vendor/pympler/util/bottle.py +3809 -0
- pythonagent/vendor/pympler/util/compat.py +23 -0
- pythonagent/vendor/pympler/util/stringutils.py +77 -0
- pythonagent/vendor/pympler/web.py +346 -0
- pythonagent/vendor/werkzeug/__init__.py +20 -0
- pythonagent/vendor/werkzeug/_compat.py +228 -0
- pythonagent/vendor/werkzeug/_internal.py +473 -0
- pythonagent/vendor/werkzeug/_reloader.py +341 -0
- pythonagent/vendor/werkzeug/datastructures.py +3120 -0
- pythonagent/vendor/werkzeug/debug/__init__.py +498 -0
- pythonagent/vendor/werkzeug/debug/console.py +218 -0
- pythonagent/vendor/werkzeug/debug/repr.py +297 -0
- pythonagent/vendor/werkzeug/debug/tbtools.py +628 -0
- pythonagent/vendor/werkzeug/exceptions.py +829 -0
- pythonagent/vendor/werkzeug/filesystem.py +64 -0
- pythonagent/vendor/werkzeug/formparser.py +584 -0
- pythonagent/vendor/werkzeug/http.py +1307 -0
- pythonagent/vendor/werkzeug/local.py +420 -0
- pythonagent/vendor/werkzeug/middleware/__init__.py +25 -0
- pythonagent/vendor/werkzeug/middleware/dispatcher.py +66 -0
- pythonagent/vendor/werkzeug/middleware/http_proxy.py +219 -0
- pythonagent/vendor/werkzeug/middleware/lint.py +408 -0
- pythonagent/vendor/werkzeug/middleware/profiler.py +132 -0
- pythonagent/vendor/werkzeug/middleware/proxy_fix.py +169 -0
- pythonagent/vendor/werkzeug/middleware/shared_data.py +293 -0
- pythonagent/vendor/werkzeug/posixemulation.py +117 -0
- pythonagent/vendor/werkzeug/routing.py +2210 -0
- pythonagent/vendor/werkzeug/security.py +249 -0
- pythonagent/vendor/werkzeug/serving.py +1117 -0
- pythonagent/vendor/werkzeug/test.py +1123 -0
- pythonagent/vendor/werkzeug/testapp.py +241 -0
- pythonagent/vendor/werkzeug/urls.py +1138 -0
- pythonagent/vendor/werkzeug/useragents.py +202 -0
- pythonagent/vendor/werkzeug/utils.py +778 -0
- pythonagent/vendor/werkzeug/wrappers/__init__.py +36 -0
- pythonagent/vendor/werkzeug/wrappers/accept.py +50 -0
- pythonagent/vendor/werkzeug/wrappers/auth.py +33 -0
- pythonagent/vendor/werkzeug/wrappers/base_request.py +673 -0
- pythonagent/vendor/werkzeug/wrappers/base_response.py +700 -0
- pythonagent/vendor/werkzeug/wrappers/common_descriptors.py +341 -0
- pythonagent/vendor/werkzeug/wrappers/cors.py +100 -0
- pythonagent/vendor/werkzeug/wrappers/etag.py +304 -0
- pythonagent/vendor/werkzeug/wrappers/json.py +145 -0
- pythonagent/vendor/werkzeug/wrappers/request.py +49 -0
- pythonagent/vendor/werkzeug/wrappers/response.py +84 -0
- pythonagent/vendor/werkzeug/wrappers/user_agent.py +14 -0
- pythonagent/vendor/werkzeug/wsgi.py +1000 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""
|
|
2
|
+
werkzeug.wrappers
|
|
3
|
+
~~~~~~~~~~~~~~~~~
|
|
4
|
+
|
|
5
|
+
The wrappers are simple request and response objects which you can
|
|
6
|
+
subclass to do whatever you want them to do. The request object contains
|
|
7
|
+
the information transmitted by the client (webbrowser) and the response
|
|
8
|
+
object contains all the information sent back to the browser.
|
|
9
|
+
|
|
10
|
+
An important detail is that the request object is created with the WSGI
|
|
11
|
+
environ and will act as high-level proxy whereas the response object is an
|
|
12
|
+
actual WSGI application.
|
|
13
|
+
|
|
14
|
+
Like everything else in Werkzeug these objects will work correctly with
|
|
15
|
+
unicode data. Incoming form data parsed by the response object will be
|
|
16
|
+
decoded into an unicode object if possible and if it makes sense.
|
|
17
|
+
|
|
18
|
+
:copyright: 2007 Pallets
|
|
19
|
+
:license: BSD-3-Clause
|
|
20
|
+
"""
|
|
21
|
+
from .accept import AcceptMixin
|
|
22
|
+
from .auth import AuthorizationMixin
|
|
23
|
+
from .auth import WWWAuthenticateMixin
|
|
24
|
+
from .base_request import BaseRequest
|
|
25
|
+
from .base_response import BaseResponse
|
|
26
|
+
from .common_descriptors import CommonRequestDescriptorsMixin
|
|
27
|
+
from .common_descriptors import CommonResponseDescriptorsMixin
|
|
28
|
+
from .etag import ETagRequestMixin
|
|
29
|
+
from .etag import ETagResponseMixin
|
|
30
|
+
from .request import PlainRequest
|
|
31
|
+
from .request import Request
|
|
32
|
+
from .request import StreamOnlyMixin
|
|
33
|
+
from .response import Response
|
|
34
|
+
from .response import ResponseStream
|
|
35
|
+
from .response import ResponseStreamMixin
|
|
36
|
+
from .user_agent import UserAgentMixin
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
from ..datastructures import CharsetAccept
|
|
2
|
+
from ..datastructures import LanguageAccept
|
|
3
|
+
from ..datastructures import MIMEAccept
|
|
4
|
+
from ..http import parse_accept_header
|
|
5
|
+
from ..utils import cached_property
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class AcceptMixin(object):
|
|
9
|
+
"""A mixin for classes with an :attr:`~BaseResponse.environ` attribute
|
|
10
|
+
to get all the HTTP accept headers as
|
|
11
|
+
:class:`~werkzeug.datastructures.Accept` objects (or subclasses
|
|
12
|
+
thereof).
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
@cached_property
|
|
16
|
+
def accept_mimetypes(self):
|
|
17
|
+
"""List of mimetypes this client supports as
|
|
18
|
+
:class:`~werkzeug.datastructures.MIMEAccept` object.
|
|
19
|
+
"""
|
|
20
|
+
return parse_accept_header(self.environ.get("HTTP_ACCEPT"), MIMEAccept)
|
|
21
|
+
|
|
22
|
+
@cached_property
|
|
23
|
+
def accept_charsets(self):
|
|
24
|
+
"""List of charsets this client supports as
|
|
25
|
+
:class:`~werkzeug.datastructures.CharsetAccept` object.
|
|
26
|
+
"""
|
|
27
|
+
return parse_accept_header(
|
|
28
|
+
self.environ.get("HTTP_ACCEPT_CHARSET"), CharsetAccept
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
@cached_property
|
|
32
|
+
def accept_encodings(self):
|
|
33
|
+
"""List of encodings this client accepts. Encodings in a HTTP term
|
|
34
|
+
are compression encodings such as gzip. For charsets have a look at
|
|
35
|
+
:attr:`accept_charset`.
|
|
36
|
+
"""
|
|
37
|
+
return parse_accept_header(self.environ.get("HTTP_ACCEPT_ENCODING"))
|
|
38
|
+
|
|
39
|
+
@cached_property
|
|
40
|
+
def accept_languages(self):
|
|
41
|
+
"""List of languages this client accepts as
|
|
42
|
+
:class:`~werkzeug.datastructures.LanguageAccept` object.
|
|
43
|
+
|
|
44
|
+
.. versionchanged 0.5
|
|
45
|
+
In previous versions this was a regular
|
|
46
|
+
:class:`~werkzeug.datastructures.Accept` object.
|
|
47
|
+
"""
|
|
48
|
+
return parse_accept_header(
|
|
49
|
+
self.environ.get("HTTP_ACCEPT_LANGUAGE"), LanguageAccept
|
|
50
|
+
)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
from ..http import parse_authorization_header
|
|
2
|
+
from ..http import parse_www_authenticate_header
|
|
3
|
+
from ..utils import cached_property
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class AuthorizationMixin(object):
|
|
7
|
+
"""Adds an :attr:`authorization` property that represents the parsed
|
|
8
|
+
value of the `Authorization` header as
|
|
9
|
+
:class:`~werkzeug.datastructures.Authorization` object.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
@cached_property
|
|
13
|
+
def authorization(self):
|
|
14
|
+
"""The `Authorization` object in parsed form."""
|
|
15
|
+
header = self.environ.get("HTTP_AUTHORIZATION")
|
|
16
|
+
return parse_authorization_header(header)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class WWWAuthenticateMixin(object):
|
|
20
|
+
"""Adds a :attr:`www_authenticate` property to a response object."""
|
|
21
|
+
|
|
22
|
+
@property
|
|
23
|
+
def www_authenticate(self):
|
|
24
|
+
"""The `WWW-Authenticate` header in a parsed form."""
|
|
25
|
+
|
|
26
|
+
def on_update(www_auth):
|
|
27
|
+
if not www_auth and "www-authenticate" in self.headers:
|
|
28
|
+
del self.headers["www-authenticate"]
|
|
29
|
+
elif www_auth:
|
|
30
|
+
self.headers["WWW-Authenticate"] = www_auth.to_header()
|
|
31
|
+
|
|
32
|
+
header = self.headers.get("www-authenticate")
|
|
33
|
+
return parse_www_authenticate_header(header, on_update)
|