dt-extensions-sdk 1.7.4__tar.gz
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.
- dt_extensions_sdk-1.7.4/.github/workflows/build-package.yml +40 -0
- dt_extensions_sdk-1.7.4/.github/workflows/gh-pages-docs.yml +76 -0
- dt_extensions_sdk-1.7.4/.github/workflows/publish.yml +87 -0
- dt_extensions_sdk-1.7.4/.gitignore +173 -0
- dt_extensions_sdk-1.7.4/LICENSE.txt +9 -0
- dt_extensions_sdk-1.7.4/PKG-INFO +120 -0
- dt_extensions_sdk-1.7.4/README.md +98 -0
- dt_extensions_sdk-1.7.4/docs/_static/dt-sdk-header.png +0 -0
- dt_extensions_sdk-1.7.4/docs/_static/dt-sdk-logo.png +0 -0
- dt_extensions_sdk-1.7.4/docs/_static/favicon.ico +0 -0
- dt_extensions_sdk-1.7.4/docs/_static/img/migrate-01-new-extension.png +0 -0
- dt_extensions_sdk-1.7.4/docs/_static/img/migrate-02-type.png +0 -0
- dt_extensions_sdk-1.7.4/docs/_static/img/migrate-03-import.png +0 -0
- dt_extensions_sdk-1.7.4/docs/_static/img/migrate-04-import-remote.png +0 -0
- dt_extensions_sdk-1.7.4/docs/_static/img/migrate-05-activation.png +0 -0
- dt_extensions_sdk-1.7.4/docs/_static/img/migrate-06-activation-config.png +0 -0
- dt_extensions_sdk-1.7.4/docs/api/events/event_severity.rst +13 -0
- dt_extensions_sdk-1.7.4/docs/api/events/event_type.rst +14 -0
- dt_extensions_sdk-1.7.4/docs/api/events/index.rst +9 -0
- dt_extensions_sdk-1.7.4/docs/api/extension.rst +6 -0
- dt_extensions_sdk-1.7.4/docs/api/metrics/index.rst +9 -0
- dt_extensions_sdk-1.7.4/docs/api/metrics/metric.rst +19 -0
- dt_extensions_sdk-1.7.4/docs/api/metrics/metric_type.rst +18 -0
- dt_extensions_sdk-1.7.4/docs/cli/assemble.rst +4 -0
- dt_extensions_sdk-1.7.4/docs/cli/build.rst +4 -0
- dt_extensions_sdk-1.7.4/docs/cli/create.rst +4 -0
- dt_extensions_sdk-1.7.4/docs/cli/gencerts.rst +4 -0
- dt_extensions_sdk-1.7.4/docs/cli/help.rst +4 -0
- dt_extensions_sdk-1.7.4/docs/cli/run.rst +4 -0
- dt_extensions_sdk-1.7.4/docs/cli/sign.rst +4 -0
- dt_extensions_sdk-1.7.4/docs/cli/upload.rst +4 -0
- dt_extensions_sdk-1.7.4/docs/cli/wheel.rst +4 -0
- dt_extensions_sdk-1.7.4/docs/conf.py +98 -0
- dt_extensions_sdk-1.7.4/docs/guides/building.rst +129 -0
- dt_extensions_sdk-1.7.4/docs/guides/extension_structure.rst +305 -0
- dt_extensions_sdk-1.7.4/docs/guides/installation.rst +38 -0
- dt_extensions_sdk-1.7.4/docs/guides/migration.rst +159 -0
- dt_extensions_sdk-1.7.4/docs/index.rst +302 -0
- dt_extensions_sdk-1.7.4/docs/requirements.txt +2 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/__about__.py +6 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/__init__.py +27 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/cli/__init__.py +5 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/cli/create/__init__.py +1 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/cli/create/create.py +76 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/cli/create/extension_template/.gitignore.template +163 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/cli/create/extension_template/README.md.template +34 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/cli/create/extension_template/activation.json.template +15 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/cli/create/extension_template/extension/activationSchema.json.template +118 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/cli/create/extension_template/extension/extension.yaml.template +17 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/cli/create/extension_template/extension_name/__init__.py.template +0 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/cli/create/extension_template/extension_name/__main__.py.template +40 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/cli/create/extension_template/ruff.toml.template +77 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/cli/create/extension_template/secrets.json.template +3 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/cli/create/extension_template/setup.py.template +30 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/cli/main.py +511 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/cli/schema.py +129 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/sdk/__init__.py +3 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/sdk/activation.py +42 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/sdk/callback.py +164 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/sdk/communication.py +491 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/sdk/event.py +19 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/sdk/extension.py +1256 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/sdk/helper.py +191 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/sdk/metric.py +117 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/sdk/runtime.py +67 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/sdk/snapshot.py +214 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/sdk/status.py +263 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/sdk/throttled_logger.py +68 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/sdk/vendor/__init__.py +0 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/sdk/vendor/mureq/LICENSE +14 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/sdk/vendor/mureq/__init__.py +0 -0
- dt_extensions_sdk-1.7.4/dynatrace_extension/sdk/vendor/mureq/mureq.py +448 -0
- dt_extensions_sdk-1.7.4/pyproject.toml +212 -0
- dt_extensions_sdk-1.7.4/tests/__init__.py +3 -0
- dt_extensions_sdk-1.7.4/tests/cli/__init__.py +0 -0
- dt_extensions_sdk-1.7.4/tests/cli/test_dt_sdk.py +105 -0
- dt_extensions_sdk-1.7.4/tests/cli/test_templates.py +19 -0
- dt_extensions_sdk-1.7.4/tests/cli/test_types.py +54 -0
- dt_extensions_sdk-1.7.4/tests/data/snapshot.json +3764 -0
- dt_extensions_sdk-1.7.4/tests/sdk/__init__.py +0 -0
- dt_extensions_sdk-1.7.4/tests/sdk/test_activation.py +61 -0
- dt_extensions_sdk-1.7.4/tests/sdk/test_callback.py +66 -0
- dt_extensions_sdk-1.7.4/tests/sdk/test_communication.py +94 -0
- dt_extensions_sdk-1.7.4/tests/sdk/test_endpoints_sfm.py +305 -0
- dt_extensions_sdk-1.7.4/tests/sdk/test_extension.py +881 -0
- dt_extensions_sdk-1.7.4/tests/sdk/test_metric.py +42 -0
- dt_extensions_sdk-1.7.4/tests/sdk/test_runtime_properties.py +22 -0
- dt_extensions_sdk-1.7.4/tests/sdk/test_snapshot.py +48 -0
- dt_extensions_sdk-1.7.4/tests/sdk/test_status.py +727 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: Build distribution 📦
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build-package:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- name: Set up Python
|
|
15
|
+
uses: actions/setup-python@v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.10"
|
|
18
|
+
|
|
19
|
+
- name: Install hatch
|
|
20
|
+
run: |
|
|
21
|
+
pip install hatch --user
|
|
22
|
+
|
|
23
|
+
- name: Run tests
|
|
24
|
+
run: |
|
|
25
|
+
python3 -m hatch run test
|
|
26
|
+
|
|
27
|
+
- name: Run linting
|
|
28
|
+
run: |
|
|
29
|
+
python3 -m hatch run lint:all
|
|
30
|
+
|
|
31
|
+
- name: Build a wheel and a source tarball
|
|
32
|
+
run: |
|
|
33
|
+
python3 -m hatch build
|
|
34
|
+
|
|
35
|
+
- name: Upload built distributions
|
|
36
|
+
uses: actions/upload-artifact@v4
|
|
37
|
+
with:
|
|
38
|
+
name: package
|
|
39
|
+
path: dist/*
|
|
40
|
+
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: Update Docs
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- main
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build-docs:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v2
|
|
14
|
+
|
|
15
|
+
- uses: actions/setup-python@v2
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.10"
|
|
18
|
+
|
|
19
|
+
- name: Install hatch
|
|
20
|
+
run: |
|
|
21
|
+
pip install hatch
|
|
22
|
+
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: |
|
|
25
|
+
hatch env create
|
|
26
|
+
|
|
27
|
+
- name: Build the docs
|
|
28
|
+
run: |
|
|
29
|
+
hatch run docs:build
|
|
30
|
+
|
|
31
|
+
- name: Cache built docs as artifact
|
|
32
|
+
uses: actions/upload-artifact@v2
|
|
33
|
+
with:
|
|
34
|
+
name: rendered-docs
|
|
35
|
+
path: |
|
|
36
|
+
docs/_build/**
|
|
37
|
+
|
|
38
|
+
upload-docs:
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
needs:
|
|
41
|
+
- build-docs
|
|
42
|
+
|
|
43
|
+
steps:
|
|
44
|
+
- name: Download built docs as cached artifact
|
|
45
|
+
uses: actions/download-artifact@v2
|
|
46
|
+
with:
|
|
47
|
+
name: rendered-docs
|
|
48
|
+
|
|
49
|
+
- name: Change Git username for gh-pages branch
|
|
50
|
+
run: |
|
|
51
|
+
git config --global user.name "${GITHUB_ACTOR}"
|
|
52
|
+
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
|
53
|
+
|
|
54
|
+
- name: Initialize gh-pages branch
|
|
55
|
+
run: |
|
|
56
|
+
git init
|
|
57
|
+
git remote add deploy "https://token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
|
|
58
|
+
git checkout -b gh-pages
|
|
59
|
+
|
|
60
|
+
- name: Add README disclaimer
|
|
61
|
+
run: |
|
|
62
|
+
echo '# GitHub Pages for `dt-extensions-sdk`' > README.md
|
|
63
|
+
echo "" >> README.md
|
|
64
|
+
echo "The contents of this branch are built using GitHub Actions workflow and Sphinx." >> README.md
|
|
65
|
+
echo "" >> README.md
|
|
66
|
+
echo "*commit ${GITHUB_SHA:0:6}*" >> README.md
|
|
67
|
+
|
|
68
|
+
- name: Add .nojekyll file to prevent the contents from being built by GitHub pages second time
|
|
69
|
+
run: |
|
|
70
|
+
touch .nojekyll
|
|
71
|
+
|
|
72
|
+
- name: Push everything to gh-pages branch on GitHub
|
|
73
|
+
run: |
|
|
74
|
+
git add .
|
|
75
|
+
git commit -m "📝 Rebuilt docs: commit ${GITHUB_SHA:0:6}"
|
|
76
|
+
git push deploy gh-pages --force
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
on:
|
|
3
|
+
workflow_dispatch:
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
check-tag:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- id: check_ref
|
|
10
|
+
run: echo "::set-output name=match::$(echo '${{ github.ref }}' | grep -Pq '^refs/tags/v\d+\.\d+\.\d+$' && echo true || echo false)"
|
|
11
|
+
shell: bash
|
|
12
|
+
- name: Check if tag is valid
|
|
13
|
+
if: steps.check_ref.outputs.match != 'true'
|
|
14
|
+
run: exit 1
|
|
15
|
+
|
|
16
|
+
build-package:
|
|
17
|
+
needs:
|
|
18
|
+
- check-tag
|
|
19
|
+
uses: ./.github/workflows/build-package.yml
|
|
20
|
+
|
|
21
|
+
github-release:
|
|
22
|
+
name: Create GitHub release
|
|
23
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
needs:
|
|
26
|
+
- build-package
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
|
|
30
|
+
- name: Generate changelog
|
|
31
|
+
run: |
|
|
32
|
+
cat > CHANGELOG.md <<EOT
|
|
33
|
+
# CHANGELOG
|
|
34
|
+
|
|
35
|
+
**Release**: dt-cli (${GITHUB_REF#refs/tags/})
|
|
36
|
+
|
|
37
|
+
# Changes
|
|
38
|
+
|
|
39
|
+
EOT
|
|
40
|
+
|
|
41
|
+
git log --format=format:"%ad: %s" --date=short >> CHANGELOG.md
|
|
42
|
+
|
|
43
|
+
- name: Download cached built package
|
|
44
|
+
uses: actions/download-artifact@v4
|
|
45
|
+
with:
|
|
46
|
+
name: package
|
|
47
|
+
path: dist
|
|
48
|
+
|
|
49
|
+
- name: Create GitHub release
|
|
50
|
+
uses: softprops/action-gh-release@v1
|
|
51
|
+
with:
|
|
52
|
+
files: |
|
|
53
|
+
dist/*
|
|
54
|
+
LICENSE
|
|
55
|
+
body_path: CHANGELOG.md
|
|
56
|
+
env:
|
|
57
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
58
|
+
|
|
59
|
+
publish-to-pypi:
|
|
60
|
+
name: Publish to PyPI
|
|
61
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
62
|
+
runs-on: ubuntu-latest
|
|
63
|
+
needs:
|
|
64
|
+
- build-package
|
|
65
|
+
steps:
|
|
66
|
+
- uses: actions/checkout@v4
|
|
67
|
+
|
|
68
|
+
- name: Set up Python 3.10
|
|
69
|
+
uses: actions/setup-python@v5
|
|
70
|
+
with:
|
|
71
|
+
python-version: '3.10'
|
|
72
|
+
|
|
73
|
+
- name: Install hatch
|
|
74
|
+
run: |
|
|
75
|
+
pip install hatch --user
|
|
76
|
+
|
|
77
|
+
- name: Download cached built package
|
|
78
|
+
uses: actions/download-artifact@v4
|
|
79
|
+
with:
|
|
80
|
+
name: package
|
|
81
|
+
path: dist
|
|
82
|
+
|
|
83
|
+
- name: Publish to PyPI
|
|
84
|
+
env:
|
|
85
|
+
PYPI_PUBLISH_TOKEN: ${{ secrets.PYPI_PUBLISH_TOKEN }}
|
|
86
|
+
run: |
|
|
87
|
+
hatch publish --user __token__ --auth $PYPI_PUBLISH_TOKEN --no-prompt
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Docs
|
|
2
|
+
docs/_build
|
|
3
|
+
docs/my_extension
|
|
4
|
+
|
|
5
|
+
# Byte-compiled / optimized / DLL files
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[cod]
|
|
8
|
+
*$py.class
|
|
9
|
+
|
|
10
|
+
# C extensions
|
|
11
|
+
*.so
|
|
12
|
+
|
|
13
|
+
# Distribution / packaging
|
|
14
|
+
.Python
|
|
15
|
+
build/
|
|
16
|
+
develop-eggs/
|
|
17
|
+
dist/
|
|
18
|
+
downloads/
|
|
19
|
+
eggs/
|
|
20
|
+
.eggs/
|
|
21
|
+
lib/
|
|
22
|
+
lib64/
|
|
23
|
+
parts/
|
|
24
|
+
sdist/
|
|
25
|
+
var/
|
|
26
|
+
wheels/
|
|
27
|
+
share/python-wheels/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg
|
|
31
|
+
MANIFEST
|
|
32
|
+
|
|
33
|
+
# PyInstaller
|
|
34
|
+
# Usually these files are written by a python script from a template
|
|
35
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
36
|
+
*.manifest
|
|
37
|
+
*.spec
|
|
38
|
+
|
|
39
|
+
# Installer logs
|
|
40
|
+
pip-log.txt
|
|
41
|
+
pip-delete-this-directory.txt
|
|
42
|
+
|
|
43
|
+
# Unit test / coverage reports
|
|
44
|
+
htmlcov/
|
|
45
|
+
.tox/
|
|
46
|
+
.nox/
|
|
47
|
+
.coverage
|
|
48
|
+
.coverage.*
|
|
49
|
+
.cache
|
|
50
|
+
nosetests.xml
|
|
51
|
+
coverage.xml
|
|
52
|
+
*.cover
|
|
53
|
+
*.py,cover
|
|
54
|
+
.hypothesis/
|
|
55
|
+
.pytest_cache/
|
|
56
|
+
cover/
|
|
57
|
+
|
|
58
|
+
# Translations
|
|
59
|
+
*.mo
|
|
60
|
+
*.pot
|
|
61
|
+
|
|
62
|
+
# Django stuff:
|
|
63
|
+
*.log
|
|
64
|
+
local_settings.py
|
|
65
|
+
db.sqlite3
|
|
66
|
+
db.sqlite3-journal
|
|
67
|
+
|
|
68
|
+
# Flask stuff:
|
|
69
|
+
instance/
|
|
70
|
+
.webassets-cache
|
|
71
|
+
|
|
72
|
+
# Scrapy stuff:
|
|
73
|
+
.scrapy
|
|
74
|
+
|
|
75
|
+
# Sphinx documentation
|
|
76
|
+
docs/_build/
|
|
77
|
+
|
|
78
|
+
# PyBuilder
|
|
79
|
+
.pybuilder/
|
|
80
|
+
target/
|
|
81
|
+
|
|
82
|
+
# Jupyter Notebook
|
|
83
|
+
.ipynb_checkpoints
|
|
84
|
+
|
|
85
|
+
# IPython
|
|
86
|
+
profile_default/
|
|
87
|
+
ipython_config.py
|
|
88
|
+
|
|
89
|
+
# pyenv
|
|
90
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
91
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
92
|
+
.python-version
|
|
93
|
+
|
|
94
|
+
# pipenv
|
|
95
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
96
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
97
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
98
|
+
# install all needed dependencies.
|
|
99
|
+
#Pipfile.lock
|
|
100
|
+
|
|
101
|
+
# poetry
|
|
102
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
103
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
104
|
+
# commonly ignored for libraries.
|
|
105
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
106
|
+
#poetry.lock
|
|
107
|
+
|
|
108
|
+
# pdm
|
|
109
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
110
|
+
#pdm.lock
|
|
111
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
112
|
+
# in version control.
|
|
113
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
114
|
+
.pdm.toml
|
|
115
|
+
|
|
116
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
117
|
+
__pypackages__/
|
|
118
|
+
|
|
119
|
+
# Celery stuff
|
|
120
|
+
celerybeat-schedule
|
|
121
|
+
celerybeat.pid
|
|
122
|
+
|
|
123
|
+
# SageMath parsed files
|
|
124
|
+
*.sage.py
|
|
125
|
+
|
|
126
|
+
# Environments
|
|
127
|
+
.env
|
|
128
|
+
.venv
|
|
129
|
+
env/
|
|
130
|
+
venv/
|
|
131
|
+
ENV/
|
|
132
|
+
env.bak/
|
|
133
|
+
venv.bak/
|
|
134
|
+
|
|
135
|
+
# Spyder project settings
|
|
136
|
+
.spyderproject
|
|
137
|
+
.spyproject
|
|
138
|
+
|
|
139
|
+
# Rope project settings
|
|
140
|
+
.ropeproject
|
|
141
|
+
|
|
142
|
+
# mkdocs documentation
|
|
143
|
+
/site
|
|
144
|
+
|
|
145
|
+
# mypy
|
|
146
|
+
.mypy_cache/
|
|
147
|
+
.dmypy.json
|
|
148
|
+
dmypy.json
|
|
149
|
+
|
|
150
|
+
# Pyre type checker
|
|
151
|
+
.pyre/
|
|
152
|
+
|
|
153
|
+
# pytype static type analyzer
|
|
154
|
+
.pytype/
|
|
155
|
+
|
|
156
|
+
# Cython debug symbols
|
|
157
|
+
cython_debug/
|
|
158
|
+
|
|
159
|
+
# PyCharm
|
|
160
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
161
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
162
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
163
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
164
|
+
.idea/
|
|
165
|
+
|
|
166
|
+
# VSCode
|
|
167
|
+
.vscode/
|
|
168
|
+
|
|
169
|
+
test_temp/
|
|
170
|
+
|
|
171
|
+
# Thumbnails
|
|
172
|
+
.DS_Store
|
|
173
|
+
Thumb.db
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023-present Dynatrace LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dt-extensions-sdk
|
|
3
|
+
Version: 1.7.4
|
|
4
|
+
Project-URL: Documentation, https://github.com/dynatrace-extensions/dt-extensions-python-sdk#readme
|
|
5
|
+
Project-URL: Issues, https://github.com/dynatrace-extensions/dt-extensions-python-sdk/issues
|
|
6
|
+
Project-URL: Source, https://github.com/dynatrace-extensions/dt-extensions-python-sdk
|
|
7
|
+
Author-email: dlopes7 <davidribeirolopes@gmail.com>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE.txt
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Programming Language :: Python
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
14
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
15
|
+
Requires-Python: <3.11,>=3.10
|
|
16
|
+
Provides-Extra: cli
|
|
17
|
+
Requires-Dist: dt-cli>=1.6.13; extra == 'cli'
|
|
18
|
+
Requires-Dist: pyyaml; extra == 'cli'
|
|
19
|
+
Requires-Dist: ruff; extra == 'cli'
|
|
20
|
+
Requires-Dist: typer[all]; extra == 'cli'
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# Dynatrace Extensions Python SDK
|
|
24
|
+
|
|
25
|
+
[](https://pypi.org/project/dt-extensions-sdk)
|
|
26
|
+
[](https://img.shields.io/badge/python-3.10-blue)
|
|
27
|
+
|
|
28
|
+
-----
|
|
29
|
+
|
|
30
|
+
**Table of Contents**
|
|
31
|
+
|
|
32
|
+
- [Quick Start](#quick-start)
|
|
33
|
+
- [License](#license)
|
|
34
|
+
- [Developing](#developing)
|
|
35
|
+
|
|
36
|
+
## Documentation
|
|
37
|
+
|
|
38
|
+
The documentation can be found on [github pages](https://dynatrace-extensions.github.io/dt-extensions-python-sdk/)
|
|
39
|
+
|
|
40
|
+
## Quick Start
|
|
41
|
+
|
|
42
|
+
### Requirements:
|
|
43
|
+
|
|
44
|
+
* Python 3.10
|
|
45
|
+
|
|
46
|
+
### Install the SDK
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install dt-extensions-sdk[cli]
|
|
50
|
+
# Note, on some shells like zsh you may need to escape the brackets - pip install dt-extensions-sdk\[cli\]
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Create signing certificates
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
dt-sdk gencerts
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Create a new extension
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
dt-sdk create my_first_extension
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Simulate
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
cd my_first_extension
|
|
69
|
+
dt-sdk run
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Build
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
dt-sdk build
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
### Upload
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Note, you need to either set environment variables DT_API_URL and DT_API_TOKEN or pass them as arguments
|
|
83
|
+
dt-sdk upload
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Developing
|
|
87
|
+
|
|
88
|
+
### Testing
|
|
89
|
+
|
|
90
|
+
```console
|
|
91
|
+
hatch run test
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Linting
|
|
95
|
+
|
|
96
|
+
```console
|
|
97
|
+
hatch run lint:all
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Building
|
|
101
|
+
|
|
102
|
+
```console
|
|
103
|
+
hatch build
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Building docs
|
|
107
|
+
|
|
108
|
+
```console
|
|
109
|
+
hatch run docs:build
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## License
|
|
113
|
+
|
|
114
|
+
`dt-extensions-sdk` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
## Publishing to PyPI
|
|
118
|
+
|
|
119
|
+
It's automatically published to PyPi on each pushed tag, and uses [gh-action-pypi-publish](https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/)
|
|
120
|
+
Version will be determined using __about__.py
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Dynatrace Extensions Python SDK
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/dt-extensions-sdk)
|
|
4
|
+
[](https://img.shields.io/badge/python-3.10-blue)
|
|
5
|
+
|
|
6
|
+
-----
|
|
7
|
+
|
|
8
|
+
**Table of Contents**
|
|
9
|
+
|
|
10
|
+
- [Quick Start](#quick-start)
|
|
11
|
+
- [License](#license)
|
|
12
|
+
- [Developing](#developing)
|
|
13
|
+
|
|
14
|
+
## Documentation
|
|
15
|
+
|
|
16
|
+
The documentation can be found on [github pages](https://dynatrace-extensions.github.io/dt-extensions-python-sdk/)
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
|
|
20
|
+
### Requirements:
|
|
21
|
+
|
|
22
|
+
* Python 3.10
|
|
23
|
+
|
|
24
|
+
### Install the SDK
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install dt-extensions-sdk[cli]
|
|
28
|
+
# Note, on some shells like zsh you may need to escape the brackets - pip install dt-extensions-sdk\[cli\]
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Create signing certificates
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
dt-sdk gencerts
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Create a new extension
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
dt-sdk create my_first_extension
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Simulate
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
cd my_first_extension
|
|
47
|
+
dt-sdk run
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Build
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
dt-sdk build
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Upload
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Note, you need to either set environment variables DT_API_URL and DT_API_TOKEN or pass them as arguments
|
|
61
|
+
dt-sdk upload
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Developing
|
|
65
|
+
|
|
66
|
+
### Testing
|
|
67
|
+
|
|
68
|
+
```console
|
|
69
|
+
hatch run test
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Linting
|
|
73
|
+
|
|
74
|
+
```console
|
|
75
|
+
hatch run lint:all
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Building
|
|
79
|
+
|
|
80
|
+
```console
|
|
81
|
+
hatch build
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Building docs
|
|
85
|
+
|
|
86
|
+
```console
|
|
87
|
+
hatch run docs:build
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## License
|
|
91
|
+
|
|
92
|
+
`dt-extensions-sdk` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
## Publishing to PyPI
|
|
96
|
+
|
|
97
|
+
It's automatically published to PyPi on each pushed tag, and uses [gh-action-pypi-publish](https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/)
|
|
98
|
+
Version will be determined using __about__.py
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Event Severity
|
|
2
|
+
==============
|
|
3
|
+
|
|
4
|
+
The :class:`Severity` class is used to define the severity of a log event.
|
|
5
|
+
This enum can only be used in the context of a log ingestion when calling
|
|
6
|
+
the :meth:`dynatrace_extension.Extension.report_event` method.
|
|
7
|
+
|
|
8
|
+
Members
|
|
9
|
+
^^^^^^^
|
|
10
|
+
|
|
11
|
+
.. autoclass:: dynatrace_extension.Severity
|
|
12
|
+
:members:
|
|
13
|
+
:undoc-members:
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Event Type
|
|
2
|
+
==========
|
|
3
|
+
|
|
4
|
+
The :class:`DtEventType` class is utilized to define the type event as
|
|
5
|
+
ingested through the Events V2 API.
|
|
6
|
+
This enum can only be used in the context of a event ingestion when
|
|
7
|
+
calling the :meth:`dynatrace_extension.Extension.report_dt_event` method.
|
|
8
|
+
|
|
9
|
+
Members
|
|
10
|
+
^^^^^^^
|
|
11
|
+
|
|
12
|
+
.. autoclass:: dynatrace_extension.DtEventType
|
|
13
|
+
:members:
|
|
14
|
+
:undoc-members:
|