├── .github
└── workflows
│ ├── ci_branch.yaml
│ └── ci_master.yaml
├── .gitignore
├── .pre-commit-config.yaml
├── .releaserc
├── CHANGELOG.md
├── CONTRIBUTORS.md
├── LICENSE
├── README.md
├── commitlint.config.js
├── make
├── poetry.lock
├── pyproject.toml
├── setup.cfg
├── starlette_prometheus
├── __init__.py
├── middleware.py
├── py.typed
└── view.py
└── tests
├── __init__.py
└── test_end_to_end.py
/.github/workflows/ci_branch.yaml:
--------------------------------------------------------------------------------
1 | name: Continuous Integration (Branch)
2 |
3 | on:
4 | pull_request:
5 | types: [opened, synchronize, reopened]
6 |
7 | jobs:
8 | test:
9 | name: Test (${{ matrix.python }})
10 | runs-on: ubuntu-latest
11 | strategy:
12 | matrix:
13 | python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
14 | container:
15 | image: python:${{ matrix.python }}
16 | steps:
17 | - uses: actions/checkout@master
18 | with:
19 | fetch-depth: 0
20 | - name: Commit Linter
21 | uses: wagoid/commitlint-github-action@v5
22 | - id: install
23 | name: Install requirements
24 | run: |
25 | pip install clinner pip poetry --upgrade
26 | python make install
27 | - id: black
28 | name: Code format checking
29 | run: python make black --check .
30 | - id: isort
31 | name: Imports order checking
32 | run: python make isort --check .
33 | - id: ruff
34 | name: Code lint
35 | run: python make ruff .
36 | - id: tests
37 | name: Tests
38 | run: python make test
39 |
--------------------------------------------------------------------------------
/.github/workflows/ci_master.yaml:
--------------------------------------------------------------------------------
1 | name: Continuous Integration
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 |
8 | jobs:
9 | test:
10 | name: Test (${{ matrix.python }})
11 | runs-on: ubuntu-latest
12 | strategy:
13 | matrix:
14 | python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
15 | container:
16 | image: python:${{ matrix.python }}
17 | steps:
18 | - uses: actions/checkout@master
19 | with:
20 | fetch-depth: 0
21 | - name: Commit Linter
22 | uses: wagoid/commitlint-github-action@v5
23 | - id: install
24 | name: Install requirements
25 | run: |
26 | pip install clinner pip poetry --upgrade
27 | python make install
28 | - id: black
29 | name: Code format checking
30 | run: python make black --check .
31 | - id: isort
32 | name: Imports order checking
33 | run: python make isort --check .
34 | - id: ruff
35 | name: Code lint
36 | run: python make ruff .
37 | - id: tests
38 | name: Tests
39 | run: python make test
40 | release:
41 | needs: test
42 | name: Release a new version
43 | runs-on: ubuntu-latest
44 | steps:
45 | - name: Check out the repo
46 | uses: actions/checkout@master
47 | - name: Setup node
48 | uses: actions/setup-node@v3
49 | with:
50 | node-version: 20
51 | - id: install
52 | name: Install requirements
53 | run: |
54 | pip install clinner pip poetry --upgrade
55 | python make install
56 | - id: semantic
57 | name: Semantic Release
58 | uses: cycjimmy/semantic-release-action@v3
59 | with:
60 | extra_plugins: |
61 | semantic-release-gitmoji@1.5.0
62 | @semantic-release/changelog
63 | @semantic-release/exec
64 | @semantic-release/git
65 | env:
66 | GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
67 | PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
68 | - name: New release published
69 | if: steps.semantic.outputs.new_release_published == 'true'
70 | run: |
71 | echo "New version: ${{ steps.semantic.outputs.new_release_version }}"
72 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 |
9 | # Distribution / packaging
10 | .Python
11 | env/
12 | .venv/
13 | build/
14 | develop-eggs/
15 | dist/
16 | downloads/
17 | eggs/
18 | .eggs/
19 | lib/
20 | lib64/
21 | parts/
22 | sdist/
23 | var/
24 | *.egg-info/
25 | .installed.cfg
26 | *.egg
27 | *dist/
28 | pip-wheel-metadata/
29 |
30 | # Installer logs
31 | pip-log.txt
32 | pip-delete-this-directory.txt
33 |
34 | # Unit test / coverage reports
35 | htmlcov/
36 | .tox/
37 | .coverage_report/
38 | .coverage.*
39 | .coverage
40 | .cache
41 | nosetests.xml
42 | coverage.xml
43 | *,cover
44 | .pytest_cache/
45 | .test_report/
46 | test-results/
47 |
48 | ## Docs
49 | docs/_build/
50 | site/
51 |
52 | node_modules
53 | *.vscode
54 |
55 | ## Demo & Tests
56 | demo.db
57 | test.db
58 |
--------------------------------------------------------------------------------
/.pre-commit-config.yaml:
--------------------------------------------------------------------------------
1 | repos:
2 | - repo: git@github.com:pre-commit/pre-commit-hooks
3 | rev: v3.3.0
4 | hooks:
5 | - id: check-added-large-files
6 | args:
7 | - --maxkb=2000
8 | - id: check-merge-conflict
9 | - id: check-xml
10 | - id: check-yaml
11 | - id: debug-statements
12 | - id: name-tests-test
13 | args:
14 | - --django
15 | - id: pretty-format-json
16 | args:
17 | - --autofix
18 | - --indent=2
19 | - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
20 | rev: v4.0.0
21 | hooks:
22 | - id: commitlint
23 | stages: [commit-msg]
24 | - repo: local
25 | hooks:
26 | - id: ruff
27 | name: Code Linter
28 | entry: poetry run ruff
29 | language: system
30 | types: [python]
31 | - id: black
32 | name: Code Style
33 | entry: poetry run black
34 | args:
35 | - -q
36 | - --safe
37 | - --line-length=120
38 | language: system
39 | types: [python]
40 | - id: isort
41 | name: Sort Imports
42 | entry: poetry run isort
43 | args:
44 | - -e
45 | language: system
46 | types: [python]
47 |
--------------------------------------------------------------------------------
/.releaserc:
--------------------------------------------------------------------------------
1 | {
2 | "branch": "master",
3 | "plugins": [
4 | [
5 | "semantic-release-gitmoji",
6 | {
7 | "releaseRules": {
8 | "major": [
9 | ":boom:"
10 | ],
11 | "minor": [
12 | ":sparkles:"
13 | ],
14 | "patch": [
15 | ":bug:",
16 | ":ambulance:",
17 | ":lock:"
18 | ]
19 | }
20 | }
21 | ],
22 | [
23 | "@semantic-release/changelog",
24 | {
25 | "changelogFile": "CHANGELOG.md",
26 | "changelogTitle": "# Semantic Versioning Changelog"
27 | }
28 | ],
29 | [
30 | "@semantic-release/exec",
31 | {
32 | "prepareCmd": "python make version ${nextRelease.version}",
33 | "publishCmd": "python make publish --build"
34 | }
35 | ],
36 | [
37 | "@semantic-release/git",
38 | {
39 | "message": ":bookmark: ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
40 | "assets": [
41 | "CHANGELOG.md",
42 | "pyproject.toml",
43 | "poetry.lock"
44 | ]
45 | }
46 | ],
47 | [
48 | "@semantic-release/github",
49 | {
50 | "assets": [
51 | {
52 | "path": "dist/**"
53 | }
54 | ]
55 | }
56 | ]
57 | ]
58 | }
59 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Semantic Versioning Changelog
2 |
3 | # [v0.10.0](https://github.com/perdy/starlette-prometheus/compare/v0.9.0...v0.10.0) (2024-02-05)
4 |
5 | ## ✨ New Features
6 | - [`5269e1b`](https://github.com/perdy/starlette-prometheus/commit/5269e1b) Upgrade dependencies and fix make
7 |
8 | # [v0.8.0](https://github.com/perdy/starlette-prometheus/compare/v0.7.0...v0.8.0) (2021-08-31)
9 |
10 | ## ✨ New Features
11 | - [`3167547`](https://github.com/perdy/starlette-prometheus/commit/3167547) Add semantic release to CI
12 | - [`2ae06da`](https://github.com/perdy/starlette-prometheus/commit/2ae06da) Upgrade dependencies
13 |
14 | # Changes
15 |
16 | v0.1.0 - 2018-09-24
17 | * Initial release.
18 |
--------------------------------------------------------------------------------
/CONTRIBUTORS.md:
--------------------------------------------------------------------------------
1 | * Giacomo Herrero ([@gherrero](https://github.com/gherrero)).
2 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | starlette-api Copyright (C) 2018-present José Antonio Perdiguero López
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Starlette Prometheus
2 | [](https://github.com/perdy/starlette-prometheus/actions)
3 | [](https://pypi.org/project/starlette-prometheus/)
4 | [](https://pypi.org/project/starlette-prometheus/)
5 |
6 | ## Introduction
7 |
8 | Prometheus integration for Starlette.
9 |
10 | ## Requirements
11 |
12 | * Python 3.8+
13 | * Starlette 0.12+
14 |
15 | ## Installation
16 |
17 | ```console
18 | $ pip install starlette-prometheus
19 | ```
20 |
21 | ## Usage
22 |
23 | A complete example that exposes prometheus metrics endpoint under `/metrics/` path.
24 |
25 | ```python
26 | from starlette.applications import Starlette
27 | from starlette_prometheus import metrics, PrometheusMiddleware
28 |
29 | app = Starlette()
30 |
31 | app.add_middleware(PrometheusMiddleware)
32 | app.add_route("/metrics/", metrics)
33 | ```
34 |
35 | Metrics for paths that do not match any Starlette route can be filtered by passing
36 | `filter_unhandled_paths=True` argument to `add_middleware` method. Note that not
37 | turning on this filtering can lead to unbounded memory use when lots of different
38 | routes are called.
39 |
40 | ## Contributing
41 |
42 | This project is absolutely open to contributions so if you have a nice idea, create an issue to let the community
43 | discuss it.
44 |
--------------------------------------------------------------------------------
/commitlint.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | rules: {
3 | "type-enum": [2, "always", [':art:', ':zap:', ':fire:', ':bug:', ':ambulance:', ':sparkles:', ':memo:', ':rocket:', ':lipstick:', ':tada:', ':white_check_mark:', ':lock:', ':closed_lock_with_key:', ':bookmark:', ':rotating_light:', ':construction:', ':green_heart:', ':arrow_down:', ':arrow_up:', ':pushpin:', ':construction_worker:', ':chart_with_upwards_trend:', ':recycle:', ':heavy_plus_sign:', ':heavy_minus_sign:', ':wrench:', ':hammer:', ':globe_with_meridians:', ':pencil2:', ':poop:', ':rewind:', ':twisted_rightwards_arrows:', ':package:', ':alien:', ':truck:', ':page_facing_up:', ':boom:', ':bento:', ':wheelchair:', ':bulb:', ':beers:', ':speech_balloon:', ':card_file_box:', ':loud_sound:', ':mute:', ':busts_in_silhouette:', ':children_crossing:', ':building_construction:', ':iphone:', ':clown_face:', ':egg:', ':see_no_evil:', ':camera_flash:', ':alembic:', ':mag:', ':label:', ':seedling:', ':triangular_flag_on_post:', ':goal_net:', ':dizzy:', ':wastebasket:', ':passport_control:', ':adhesive_bandage:', ':monocle_face:', ':coffin:', ':test_tube:', ':necktie:', ':stethoscope:', ':bricks:', ':technologist:', ':money_with_wings:', ':thread:', ':safety_vest:']],
4 | "body-leading-blank": [2, "always"],
5 | "footer-leading-blank": [2, "always"],
6 | "header-max-length": [2, "always", 72],
7 | "scope-case": [2, "always", "lower-case"],
8 | "subject-case": [2, "always", ["sentence-case"]],
9 | "subject-empty": [2, "never"],
10 | "subject-full-stop": [2, "never", ["."]],
11 | "type-case": [2, "always", "lower-case"],
12 | "type-empty": [2, "never"]
13 | }, parserPreset: {
14 | parserOpts: {
15 | headerPattern: /^(:\w*:)(?:\((.*?)\))?\s((?:.*(?=\())|.*)(?:\(#(\d*)\))?/,
16 | headerCorrespondence: ["type", "scope", "subject", "ticket"]
17 | }
18 | }
19 | };
20 |
--------------------------------------------------------------------------------
/make:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding: utf-8 -*-
3 | import logging
4 | import os
5 | import shlex
6 | import shutil
7 | import subprocess
8 | import sys
9 | import tempfile
10 | import typing
11 | import urllib.request
12 |
13 | logger = logging.getLogger("cli")
14 |
15 | try:
16 | from clinner.command import Type, command
17 | from clinner.inputs import bool_input
18 | from clinner.run import Main
19 | except Exception:
20 | logger.error("Package clinner is not installed, run 'pip install clinner' to install it")
21 | sys.exit(-1)
22 |
23 | try:
24 | import toml
25 | except Exception:
26 | toml = None
27 |
28 | POETRY_URL = "https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py"
29 |
30 |
31 | def poetry(*args) -> typing.List[str]:
32 | """
33 | Build a poetry command.
34 |
35 | :param args: Poetry command args.
36 | :return: Poetry command.
37 | """
38 | try:
39 | subprocess.run(
40 | shlex.split("poetry --version"), check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL
41 | ) # noqa
42 | except ImportError:
43 | if bool_input("Do you want to install Poetry?"):
44 | with tempfile.NamedTemporaryFile() as tmp_file, urllib.request.urlopen(POETRY_URL) as response:
45 | tmp_file.write(response.read())
46 | subprocess.run(shlex.split(f"python {tmp_file.name}"))
47 | else:
48 | logger.error("Poetry is not installed.")
49 |
50 | return shlex.split("poetry") + list(args)
51 |
52 |
53 | @command(command_type=Type.SHELL, parser_opts={"help": "Install requirements"})
54 | def install(*args, **kwargs):
55 | return [poetry("install", "--with", "dev", *args)]
56 |
57 |
58 | @command(command_type=Type.PYTHON, parser_opts={"help": "Clean directory"})
59 | def clean(*args, **kwargs):
60 | for path in (".pytest_cache", "dist", "pip-wheel-metadata", "flama.egg-info", ".coverage", "test-results", "site"):
61 | shutil.rmtree(path, ignore_errors=True)
62 |
63 |
64 | @command(
65 | command_type=Type.SHELL,
66 | args=((("-c", "--clean"), {"help": "Clean before build"}),),
67 | parser_opts={"help": "Build package"},
68 | )
69 | def build(*args, **kwargs):
70 | if kwargs["clean"]:
71 | clean()
72 |
73 | return [poetry("build", *args)]
74 |
75 |
76 | @command(command_type=Type.SHELL, parser_opts={"help": "Code formatting"})
77 | def black(*args, **kwargs):
78 | return [poetry("run", "black", *args)]
79 |
80 |
81 | @command(command_type=Type.SHELL, parser_opts={"help": "Code analysis"})
82 | def ruff(*args, **kwargs):
83 | return [poetry("run", "ruff", "check", *args)]
84 |
85 |
86 | @command(command_type=Type.SHELL, parser_opts={"help": "Imports formatting"})
87 | def isort(*args, **kwargs):
88 | return [poetry("run", "isort", *args)]
89 |
90 |
91 | @command(command_type=Type.SHELL, parser_opts={"help": "Code lint using multiple tools"})
92 | def lint(*args, **kwargs):
93 | return black(".") + ruff(".") + isort(".")
94 |
95 |
96 | @command(command_type=Type.SHELL, parser_opts={"help": "Run tests"})
97 | def test(*args, **kwargs):
98 | return [poetry("run", "pytest", *args)]
99 |
100 |
101 | @command(command_type=Type.SHELL, parser_opts={"help": "Build docs"})
102 | def docs(*args, **kwargs):
103 | return [poetry("run", "mkdocs", *args)]
104 |
105 |
106 | @command(command_type=Type.SHELL, parser_opts={"help": "Upgrade version"})
107 | def version(*args, **kwargs):
108 | return [poetry("version", *args)]
109 |
110 |
111 | @command(
112 | command_type=Type.SHELL,
113 | args=((("-b", "--build"), {"help": "Build package", "action": "store_true"}),),
114 | parser_opts={"help": "Publish package"},
115 | )
116 | def publish(*args, **kwargs):
117 | cmds = []
118 |
119 | token = os.environ.get("PYPI_TOKEN")
120 |
121 | if token:
122 | cmds.append(poetry("config", "pypi-token.pypi", token))
123 |
124 | if kwargs["build"]:
125 | cmds += build(clean=True)
126 |
127 | cmds.append(poetry("publish", "--skip-existing"))
128 |
129 | return cmds
130 |
131 |
132 | class Make(Main):
133 | commands = ("install", "clean", "build", "publish", "black", "ruff", "isort", "lint", "test", "version", "docs")
134 |
135 |
136 | def main():
137 | return Make().run()
138 |
139 |
140 | if __name__ == "__main__":
141 | sys.exit(main())
142 |
--------------------------------------------------------------------------------
/poetry.lock:
--------------------------------------------------------------------------------
1 | # This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand.
2 |
3 | [[package]]
4 | name = "anyio"
5 | version = "4.2.0"
6 | description = "High level compatibility layer for multiple asynchronous event loop implementations"
7 | optional = false
8 | python-versions = ">=3.8"
9 | files = [
10 | {file = "anyio-4.2.0-py3-none-any.whl", hash = "sha256:745843b39e829e108e518c489b31dc757de7d2131d53fac32bd8df268227bfee"},
11 | {file = "anyio-4.2.0.tar.gz", hash = "sha256:e1875bb4b4e2de1669f4bc7869b6d3f54231cdced71605e6e64c9be77e3be50f"},
12 | ]
13 |
14 | [package.dependencies]
15 | exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""}
16 | idna = ">=2.8"
17 | sniffio = ">=1.1"
18 | typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""}
19 |
20 | [package.extras]
21 | doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"]
22 | test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"]
23 | trio = ["trio (>=0.23)"]
24 |
25 | [[package]]
26 | name = "appnope"
27 | version = "0.1.3"
28 | description = "Disable App Nap on macOS >= 10.9"
29 | optional = false
30 | python-versions = "*"
31 | files = [
32 | {file = "appnope-0.1.3-py2.py3-none-any.whl", hash = "sha256:265a455292d0bd8a72453494fa24df5a11eb18373a60c7c0430889f22548605e"},
33 | {file = "appnope-0.1.3.tar.gz", hash = "sha256:02bd91c4de869fbb1e1c50aafc4098827a7a54ab2f39d9dcba6c9547ed920e24"},
34 | ]
35 |
36 | [[package]]
37 | name = "asttokens"
38 | version = "2.4.1"
39 | description = "Annotate AST trees with source code positions"
40 | optional = false
41 | python-versions = "*"
42 | files = [
43 | {file = "asttokens-2.4.1-py2.py3-none-any.whl", hash = "sha256:051ed49c3dcae8913ea7cd08e46a606dba30b79993209636c4875bc1d637bc24"},
44 | {file = "asttokens-2.4.1.tar.gz", hash = "sha256:b03869718ba9a6eb027e134bfdf69f38a236d681c83c160d510768af11254ba0"},
45 | ]
46 |
47 | [package.dependencies]
48 | six = ">=1.12.0"
49 |
50 | [package.extras]
51 | astroid = ["astroid (>=1,<2)", "astroid (>=2,<4)"]
52 | test = ["astroid (>=1,<2)", "astroid (>=2,<4)", "pytest"]
53 |
54 | [[package]]
55 | name = "backcall"
56 | version = "0.2.0"
57 | description = "Specifications for callback functions passed in to an API"
58 | optional = false
59 | python-versions = "*"
60 | files = [
61 | {file = "backcall-0.2.0-py2.py3-none-any.whl", hash = "sha256:fbbce6a29f263178a1f7915c1940bde0ec2b2a967566fe1c65c1dfb7422bd255"},
62 | {file = "backcall-0.2.0.tar.gz", hash = "sha256:5cbdbf27be5e7cfadb448baf0aa95508f91f2bbc6c6437cd9cd06e2a4c215e1e"},
63 | ]
64 |
65 | [[package]]
66 | name = "black"
67 | version = "23.12.1"
68 | description = "The uncompromising code formatter."
69 | optional = false
70 | python-versions = ">=3.8"
71 | files = [
72 | {file = "black-23.12.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e0aaf6041986767a5e0ce663c7a2f0e9eaf21e6ff87a5f95cbf3675bfd4c41d2"},
73 | {file = "black-23.12.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c88b3711d12905b74206227109272673edce0cb29f27e1385f33b0163c414bba"},
74 | {file = "black-23.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a920b569dc6b3472513ba6ddea21f440d4b4c699494d2e972a1753cdc25df7b0"},
75 | {file = "black-23.12.1-cp310-cp310-win_amd64.whl", hash = "sha256:3fa4be75ef2a6b96ea8d92b1587dd8cb3a35c7e3d51f0738ced0781c3aa3a5a3"},
76 | {file = "black-23.12.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8d4df77958a622f9b5a4c96edb4b8c0034f8434032ab11077ec6c56ae9f384ba"},
77 | {file = "black-23.12.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:602cfb1196dc692424c70b6507593a2b29aac0547c1be9a1d1365f0d964c353b"},
78 | {file = "black-23.12.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c4352800f14be5b4864016882cdba10755bd50805c95f728011bcb47a4afd59"},
79 | {file = "black-23.12.1-cp311-cp311-win_amd64.whl", hash = "sha256:0808494f2b2df923ffc5723ed3c7b096bd76341f6213989759287611e9837d50"},
80 | {file = "black-23.12.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:25e57fd232a6d6ff3f4478a6fd0580838e47c93c83eaf1ccc92d4faf27112c4e"},
81 | {file = "black-23.12.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2d9e13db441c509a3763a7a3d9a49ccc1b4e974a47be4e08ade2a228876500ec"},
82 | {file = "black-23.12.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d1bd9c210f8b109b1762ec9fd36592fdd528485aadb3f5849b2740ef17e674e"},
83 | {file = "black-23.12.1-cp312-cp312-win_amd64.whl", hash = "sha256:ae76c22bde5cbb6bfd211ec343ded2163bba7883c7bc77f6b756a1049436fbb9"},
84 | {file = "black-23.12.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1fa88a0f74e50e4487477bc0bb900c6781dbddfdfa32691e780bf854c3b4a47f"},
85 | {file = "black-23.12.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a4d6a9668e45ad99d2f8ec70d5c8c04ef4f32f648ef39048d010b0689832ec6d"},
86 | {file = "black-23.12.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b18fb2ae6c4bb63eebe5be6bd869ba2f14fd0259bda7d18a46b764d8fb86298a"},
87 | {file = "black-23.12.1-cp38-cp38-win_amd64.whl", hash = "sha256:c04b6d9d20e9c13f43eee8ea87d44156b8505ca8a3c878773f68b4e4812a421e"},
88 | {file = "black-23.12.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3e1b38b3135fd4c025c28c55ddfc236b05af657828a8a6abe5deec419a0b7055"},
89 | {file = "black-23.12.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4f0031eaa7b921db76decd73636ef3a12c942ed367d8c3841a0739412b260a54"},
90 | {file = "black-23.12.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:97e56155c6b737854e60a9ab1c598ff2533d57e7506d97af5481141671abf3ea"},
91 | {file = "black-23.12.1-cp39-cp39-win_amd64.whl", hash = "sha256:dd15245c8b68fe2b6bd0f32c1556509d11bb33aec9b5d0866dd8e2ed3dba09c2"},
92 | {file = "black-23.12.1-py3-none-any.whl", hash = "sha256:78baad24af0f033958cad29731e27363183e140962595def56423e626f4bee3e"},
93 | {file = "black-23.12.1.tar.gz", hash = "sha256:4ce3ef14ebe8d9509188014d96af1c456a910d5b5cbf434a09fef7e024b3d0d5"},
94 | ]
95 |
96 | [package.dependencies]
97 | click = ">=8.0.0"
98 | mypy-extensions = ">=0.4.3"
99 | packaging = ">=22.0"
100 | pathspec = ">=0.9.0"
101 | platformdirs = ">=2"
102 | tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}
103 | typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""}
104 |
105 | [package.extras]
106 | colorama = ["colorama (>=0.4.3)"]
107 | d = ["aiohttp (>=3.7.4)", "aiohttp (>=3.7.4,!=3.9.0)"]
108 | jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"]
109 | uvloop = ["uvloop (>=0.15.2)"]
110 |
111 | [[package]]
112 | name = "certifi"
113 | version = "2024.2.2"
114 | description = "Python package for providing Mozilla's CA Bundle."
115 | optional = false
116 | python-versions = ">=3.6"
117 | files = [
118 | {file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"},
119 | {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"},
120 | ]
121 |
122 | [[package]]
123 | name = "charset-normalizer"
124 | version = "3.3.2"
125 | description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
126 | optional = false
127 | python-versions = ">=3.7.0"
128 | files = [
129 | {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"},
130 | {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3"},
131 | {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027"},
132 | {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03"},
133 | {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d"},
134 | {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e"},
135 | {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6"},
136 | {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5"},
137 | {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537"},
138 | {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c"},
139 | {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12"},
140 | {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f"},
141 | {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269"},
142 | {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519"},
143 | {file = "charset_normalizer-3.3.2-cp310-cp310-win32.whl", hash = "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73"},
144 | {file = "charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09"},
145 | {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db"},
146 | {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96"},
147 | {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e"},
148 | {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f"},
149 | {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574"},
150 | {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4"},
151 | {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8"},
152 | {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc"},
153 | {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae"},
154 | {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887"},
155 | {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae"},
156 | {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce"},
157 | {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f"},
158 | {file = "charset_normalizer-3.3.2-cp311-cp311-win32.whl", hash = "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab"},
159 | {file = "charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77"},
160 | {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8"},
161 | {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b"},
162 | {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6"},
163 | {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a"},
164 | {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389"},
165 | {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa"},
166 | {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b"},
167 | {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed"},
168 | {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26"},
169 | {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d"},
170 | {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068"},
171 | {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143"},
172 | {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4"},
173 | {file = "charset_normalizer-3.3.2-cp312-cp312-win32.whl", hash = "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7"},
174 | {file = "charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001"},
175 | {file = "charset_normalizer-3.3.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c"},
176 | {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5"},
177 | {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985"},
178 | {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6"},
179 | {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714"},
180 | {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786"},
181 | {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5"},
182 | {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c"},
183 | {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8"},
184 | {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711"},
185 | {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811"},
186 | {file = "charset_normalizer-3.3.2-cp37-cp37m-win32.whl", hash = "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4"},
187 | {file = "charset_normalizer-3.3.2-cp37-cp37m-win_amd64.whl", hash = "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99"},
188 | {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a"},
189 | {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac"},
190 | {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a"},
191 | {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33"},
192 | {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238"},
193 | {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a"},
194 | {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2"},
195 | {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8"},
196 | {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898"},
197 | {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99"},
198 | {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d"},
199 | {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04"},
200 | {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087"},
201 | {file = "charset_normalizer-3.3.2-cp38-cp38-win32.whl", hash = "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25"},
202 | {file = "charset_normalizer-3.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b"},
203 | {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4"},
204 | {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d"},
205 | {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0"},
206 | {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269"},
207 | {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c"},
208 | {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519"},
209 | {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796"},
210 | {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185"},
211 | {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c"},
212 | {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458"},
213 | {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2"},
214 | {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8"},
215 | {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"},
216 | {file = "charset_normalizer-3.3.2-cp39-cp39-win32.whl", hash = "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f"},
217 | {file = "charset_normalizer-3.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d"},
218 | {file = "charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc"},
219 | ]
220 |
221 | [[package]]
222 | name = "click"
223 | version = "8.1.7"
224 | description = "Composable command line interface toolkit"
225 | optional = false
226 | python-versions = ">=3.7"
227 | files = [
228 | {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"},
229 | {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"},
230 | ]
231 |
232 | [package.dependencies]
233 | colorama = {version = "*", markers = "platform_system == \"Windows\""}
234 |
235 | [[package]]
236 | name = "clinner"
237 | version = "1.12.3"
238 | description = "Command Line Interface builder that helps creating an entry point for your application."
239 | optional = false
240 | python-versions = ">=3.5,<4.0"
241 | files = [
242 | {file = "clinner-1.12.3-py3-none-any.whl", hash = "sha256:db7a1e52f8e0a397823bec1f2fcd8dc10f38777551f7f3625cc57aed6a596095"},
243 | {file = "clinner-1.12.3.tar.gz", hash = "sha256:c31c17ccf4997f10cc871d48f27bedd903b4e826198ebb232ccd7a9a6a49facc"},
244 | ]
245 |
246 | [package.dependencies]
247 | colorlog = ">=3.1,<4.0"
248 |
249 | [[package]]
250 | name = "colorama"
251 | version = "0.4.6"
252 | description = "Cross-platform colored terminal text."
253 | optional = false
254 | python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
255 | files = [
256 | {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
257 | {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
258 | ]
259 |
260 | [[package]]
261 | name = "colorlog"
262 | version = "3.2.0"
263 | description = "Log formatting with colors!"
264 | optional = false
265 | python-versions = "*"
266 | files = [
267 | {file = "colorlog-3.2.0-py2.py3-none-any.whl", hash = "sha256:31378a98b965c9f2bc5fb58c906e0e6d8d2922f6b8229c39903711da5b490fc2"},
268 | {file = "colorlog-3.2.0.tar.gz", hash = "sha256:45e76dc65c0ed0e8c27175c00b18d92016dc58a6feff62e168819a2bca26df68"},
269 | ]
270 |
271 | [package.dependencies]
272 | colorama = {version = "*", markers = "sys_platform == \"win32\""}
273 |
274 | [[package]]
275 | name = "coverage"
276 | version = "7.4.1"
277 | description = "Code coverage measurement for Python"
278 | optional = false
279 | python-versions = ">=3.8"
280 | files = [
281 | {file = "coverage-7.4.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:077d366e724f24fc02dbfe9d946534357fda71af9764ff99d73c3c596001bbd7"},
282 | {file = "coverage-7.4.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0193657651f5399d433c92f8ae264aff31fc1d066deee4b831549526433f3f61"},
283 | {file = "coverage-7.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d17bbc946f52ca67adf72a5ee783cd7cd3477f8f8796f59b4974a9b59cacc9ee"},
284 | {file = "coverage-7.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3277f5fa7483c927fe3a7b017b39351610265308f5267ac6d4c2b64cc1d8d25"},
285 | {file = "coverage-7.4.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6dceb61d40cbfcf45f51e59933c784a50846dc03211054bd76b421a713dcdf19"},
286 | {file = "coverage-7.4.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:6008adeca04a445ea6ef31b2cbaf1d01d02986047606f7da266629afee982630"},
287 | {file = "coverage-7.4.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:c61f66d93d712f6e03369b6a7769233bfda880b12f417eefdd4f16d1deb2fc4c"},
288 | {file = "coverage-7.4.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b9bb62fac84d5f2ff523304e59e5c439955fb3b7f44e3d7b2085184db74d733b"},
289 | {file = "coverage-7.4.1-cp310-cp310-win32.whl", hash = "sha256:f86f368e1c7ce897bf2457b9eb61169a44e2ef797099fb5728482b8d69f3f016"},
290 | {file = "coverage-7.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:869b5046d41abfea3e381dd143407b0d29b8282a904a19cb908fa24d090cc018"},
291 | {file = "coverage-7.4.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b8ffb498a83d7e0305968289441914154fb0ef5d8b3157df02a90c6695978295"},
292 | {file = "coverage-7.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3cacfaefe6089d477264001f90f55b7881ba615953414999c46cc9713ff93c8c"},
293 | {file = "coverage-7.4.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d6850e6e36e332d5511a48a251790ddc545e16e8beaf046c03985c69ccb2676"},
294 | {file = "coverage-7.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:18e961aa13b6d47f758cc5879383d27b5b3f3dcd9ce8cdbfdc2571fe86feb4dd"},
295 | {file = "coverage-7.4.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dfd1e1b9f0898817babf840b77ce9fe655ecbe8b1b327983df485b30df8cc011"},
296 | {file = "coverage-7.4.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:6b00e21f86598b6330f0019b40fb397e705135040dbedc2ca9a93c7441178e74"},
297 | {file = "coverage-7.4.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:536d609c6963c50055bab766d9951b6c394759190d03311f3e9fcf194ca909e1"},
298 | {file = "coverage-7.4.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7ac8f8eb153724f84885a1374999b7e45734bf93a87d8df1e7ce2146860edef6"},
299 | {file = "coverage-7.4.1-cp311-cp311-win32.whl", hash = "sha256:f3771b23bb3675a06f5d885c3630b1d01ea6cac9e84a01aaf5508706dba546c5"},
300 | {file = "coverage-7.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:9d2f9d4cc2a53b38cabc2d6d80f7f9b7e3da26b2f53d48f05876fef7956b6968"},
301 | {file = "coverage-7.4.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:f68ef3660677e6624c8cace943e4765545f8191313a07288a53d3da188bd8581"},
302 | {file = "coverage-7.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:23b27b8a698e749b61809fb637eb98ebf0e505710ec46a8aa6f1be7dc0dc43a6"},
303 | {file = "coverage-7.4.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e3424c554391dc9ef4a92ad28665756566a28fecf47308f91841f6c49288e66"},
304 | {file = "coverage-7.4.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e0860a348bf7004c812c8368d1fc7f77fe8e4c095d661a579196a9533778e156"},
305 | {file = "coverage-7.4.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fe558371c1bdf3b8fa03e097c523fb9645b8730399c14fe7721ee9c9e2a545d3"},
306 | {file = "coverage-7.4.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:3468cc8720402af37b6c6e7e2a9cdb9f6c16c728638a2ebc768ba1ef6f26c3a1"},
307 | {file = "coverage-7.4.1-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:02f2edb575d62172aa28fe00efe821ae31f25dc3d589055b3fb64d51e52e4ab1"},
308 | {file = "coverage-7.4.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:ca6e61dc52f601d1d224526360cdeab0d0712ec104a2ce6cc5ccef6ed9a233bc"},
309 | {file = "coverage-7.4.1-cp312-cp312-win32.whl", hash = "sha256:ca7b26a5e456a843b9b6683eada193fc1f65c761b3a473941efe5a291f604c74"},
310 | {file = "coverage-7.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:85ccc5fa54c2ed64bd91ed3b4a627b9cce04646a659512a051fa82a92c04a448"},
311 | {file = "coverage-7.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8bdb0285a0202888d19ec6b6d23d5990410decb932b709f2b0dfe216d031d218"},
312 | {file = "coverage-7.4.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:918440dea04521f499721c039863ef95433314b1db00ff826a02580c1f503e45"},
313 | {file = "coverage-7.4.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:379d4c7abad5afbe9d88cc31ea8ca262296480a86af945b08214eb1a556a3e4d"},
314 | {file = "coverage-7.4.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b094116f0b6155e36a304ff912f89bbb5067157aff5f94060ff20bbabdc8da06"},
315 | {file = "coverage-7.4.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2f5968608b1fe2a1d00d01ad1017ee27efd99b3437e08b83ded9b7af3f6f766"},
316 | {file = "coverage-7.4.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:10e88e7f41e6197ea0429ae18f21ff521d4f4490aa33048f6c6f94c6045a6a75"},
317 | {file = "coverage-7.4.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a4a3907011d39dbc3e37bdc5df0a8c93853c369039b59efa33a7b6669de04c60"},
318 | {file = "coverage-7.4.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6d224f0c4c9c98290a6990259073f496fcec1b5cc613eecbd22786d398ded3ad"},
319 | {file = "coverage-7.4.1-cp38-cp38-win32.whl", hash = "sha256:23f5881362dcb0e1a92b84b3c2809bdc90db892332daab81ad8f642d8ed55042"},
320 | {file = "coverage-7.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:a07f61fc452c43cd5328b392e52555f7d1952400a1ad09086c4a8addccbd138d"},
321 | {file = "coverage-7.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8e738a492b6221f8dcf281b67129510835461132b03024830ac0e554311a5c54"},
322 | {file = "coverage-7.4.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:46342fed0fff72efcda77040b14728049200cbba1279e0bf1188f1f2078c1d70"},
323 | {file = "coverage-7.4.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9641e21670c68c7e57d2053ddf6c443e4f0a6e18e547e86af3fad0795414a628"},
324 | {file = "coverage-7.4.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aeb2c2688ed93b027eb0d26aa188ada34acb22dceea256d76390eea135083950"},
325 | {file = "coverage-7.4.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d12c923757de24e4e2110cf8832d83a886a4cf215c6e61ed506006872b43a6d1"},
326 | {file = "coverage-7.4.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0491275c3b9971cdbd28a4595c2cb5838f08036bca31765bad5e17edf900b2c7"},
327 | {file = "coverage-7.4.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:8dfc5e195bbef80aabd81596ef52a1277ee7143fe419efc3c4d8ba2754671756"},
328 | {file = "coverage-7.4.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:1a78b656a4d12b0490ca72651fe4d9f5e07e3c6461063a9b6265ee45eb2bdd35"},
329 | {file = "coverage-7.4.1-cp39-cp39-win32.whl", hash = "sha256:f90515974b39f4dea2f27c0959688621b46d96d5a626cf9c53dbc653a895c05c"},
330 | {file = "coverage-7.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:64e723ca82a84053dd7bfcc986bdb34af8d9da83c521c19d6b472bc6880e191a"},
331 | {file = "coverage-7.4.1-pp38.pp39.pp310-none-any.whl", hash = "sha256:32a8d985462e37cfdab611a6f95b09d7c091d07668fdc26e47a725ee575fe166"},
332 | {file = "coverage-7.4.1.tar.gz", hash = "sha256:1ed4b95480952b1a26d863e546fa5094564aa0065e1e5f0d4d0041f293251d04"},
333 | ]
334 |
335 | [package.dependencies]
336 | tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""}
337 |
338 | [package.extras]
339 | toml = ["tomli"]
340 |
341 | [[package]]
342 | name = "decorator"
343 | version = "5.1.1"
344 | description = "Decorators for Humans"
345 | optional = false
346 | python-versions = ">=3.5"
347 | files = [
348 | {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"},
349 | {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"},
350 | ]
351 |
352 | [[package]]
353 | name = "exceptiongroup"
354 | version = "1.2.0"
355 | description = "Backport of PEP 654 (exception groups)"
356 | optional = false
357 | python-versions = ">=3.7"
358 | files = [
359 | {file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"},
360 | {file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"},
361 | ]
362 |
363 | [package.extras]
364 | test = ["pytest (>=6)"]
365 |
366 | [[package]]
367 | name = "execnet"
368 | version = "2.0.2"
369 | description = "execnet: rapid multi-Python deployment"
370 | optional = false
371 | python-versions = ">=3.7"
372 | files = [
373 | {file = "execnet-2.0.2-py3-none-any.whl", hash = "sha256:88256416ae766bc9e8895c76a87928c0012183da3cc4fc18016e6f050e025f41"},
374 | {file = "execnet-2.0.2.tar.gz", hash = "sha256:cc59bc4423742fd71ad227122eb0dd44db51efb3dc4095b45ac9a08c770096af"},
375 | ]
376 |
377 | [package.extras]
378 | testing = ["hatch", "pre-commit", "pytest", "tox"]
379 |
380 | [[package]]
381 | name = "executing"
382 | version = "2.0.1"
383 | description = "Get the currently executing AST node of a frame, and other information"
384 | optional = false
385 | python-versions = ">=3.5"
386 | files = [
387 | {file = "executing-2.0.1-py2.py3-none-any.whl", hash = "sha256:eac49ca94516ccc753f9fb5ce82603156e590b27525a8bc32cce8ae302eb61bc"},
388 | {file = "executing-2.0.1.tar.gz", hash = "sha256:35afe2ce3affba8ee97f2d69927fa823b08b472b7b994e36a52a964b93d16147"},
389 | ]
390 |
391 | [package.extras]
392 | tests = ["asttokens (>=2.1.0)", "coverage", "coverage-enable-subprocess", "ipython", "littleutils", "pytest", "rich"]
393 |
394 | [[package]]
395 | name = "h11"
396 | version = "0.14.0"
397 | description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1"
398 | optional = false
399 | python-versions = ">=3.7"
400 | files = [
401 | {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"},
402 | {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"},
403 | ]
404 |
405 | [[package]]
406 | name = "httpcore"
407 | version = "1.0.2"
408 | description = "A minimal low-level HTTP client."
409 | optional = false
410 | python-versions = ">=3.8"
411 | files = [
412 | {file = "httpcore-1.0.2-py3-none-any.whl", hash = "sha256:096cc05bca73b8e459a1fc3dcf585148f63e534eae4339559c9b8a8d6399acc7"},
413 | {file = "httpcore-1.0.2.tar.gz", hash = "sha256:9fc092e4799b26174648e54b74ed5f683132a464e95643b226e00c2ed2fa6535"},
414 | ]
415 |
416 | [package.dependencies]
417 | certifi = "*"
418 | h11 = ">=0.13,<0.15"
419 |
420 | [package.extras]
421 | asyncio = ["anyio (>=4.0,<5.0)"]
422 | http2 = ["h2 (>=3,<5)"]
423 | socks = ["socksio (==1.*)"]
424 | trio = ["trio (>=0.22.0,<0.23.0)"]
425 |
426 | [[package]]
427 | name = "httpx"
428 | version = "0.26.0"
429 | description = "The next generation HTTP client."
430 | optional = false
431 | python-versions = ">=3.8"
432 | files = [
433 | {file = "httpx-0.26.0-py3-none-any.whl", hash = "sha256:8915f5a3627c4d47b73e8202457cb28f1266982d1159bd5779d86a80c0eab1cd"},
434 | {file = "httpx-0.26.0.tar.gz", hash = "sha256:451b55c30d5185ea6b23c2c793abf9bb237d2a7dfb901ced6ff69ad37ec1dfaf"},
435 | ]
436 |
437 | [package.dependencies]
438 | anyio = "*"
439 | certifi = "*"
440 | httpcore = "==1.*"
441 | idna = "*"
442 | sniffio = "*"
443 |
444 | [package.extras]
445 | brotli = ["brotli", "brotlicffi"]
446 | cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"]
447 | http2 = ["h2 (>=3,<5)"]
448 | socks = ["socksio (==1.*)"]
449 |
450 | [[package]]
451 | name = "idna"
452 | version = "3.6"
453 | description = "Internationalized Domain Names in Applications (IDNA)"
454 | optional = false
455 | python-versions = ">=3.5"
456 | files = [
457 | {file = "idna-3.6-py3-none-any.whl", hash = "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"},
458 | {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"},
459 | ]
460 |
461 | [[package]]
462 | name = "iniconfig"
463 | version = "2.0.0"
464 | description = "brain-dead simple config-ini parsing"
465 | optional = false
466 | python-versions = ">=3.7"
467 | files = [
468 | {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"},
469 | {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"},
470 | ]
471 |
472 | [[package]]
473 | name = "ipython"
474 | version = "8.12.3"
475 | description = "IPython: Productive Interactive Computing"
476 | optional = false
477 | python-versions = ">=3.8"
478 | files = [
479 | {file = "ipython-8.12.3-py3-none-any.whl", hash = "sha256:b0340d46a933d27c657b211a329d0be23793c36595acf9e6ef4164bc01a1804c"},
480 | {file = "ipython-8.12.3.tar.gz", hash = "sha256:3910c4b54543c2ad73d06579aa771041b7d5707b033bd488669b4cf544e3b363"},
481 | ]
482 |
483 | [package.dependencies]
484 | appnope = {version = "*", markers = "sys_platform == \"darwin\""}
485 | backcall = "*"
486 | colorama = {version = "*", markers = "sys_platform == \"win32\""}
487 | decorator = "*"
488 | jedi = ">=0.16"
489 | matplotlib-inline = "*"
490 | pexpect = {version = ">4.3", markers = "sys_platform != \"win32\""}
491 | pickleshare = "*"
492 | prompt-toolkit = ">=3.0.30,<3.0.37 || >3.0.37,<3.1.0"
493 | pygments = ">=2.4.0"
494 | stack-data = "*"
495 | traitlets = ">=5"
496 | typing-extensions = {version = "*", markers = "python_version < \"3.10\""}
497 |
498 | [package.extras]
499 | all = ["black", "curio", "docrepr", "ipykernel", "ipyparallel", "ipywidgets", "matplotlib", "matplotlib (!=3.2.0)", "nbconvert", "nbformat", "notebook", "numpy (>=1.21)", "pandas", "pytest (<7)", "pytest (<7.1)", "pytest-asyncio", "qtconsole", "setuptools (>=18.5)", "sphinx (>=1.3)", "sphinx-rtd-theme", "stack-data", "testpath", "trio", "typing-extensions"]
500 | black = ["black"]
501 | doc = ["docrepr", "ipykernel", "matplotlib", "pytest (<7)", "pytest (<7.1)", "pytest-asyncio", "setuptools (>=18.5)", "sphinx (>=1.3)", "sphinx-rtd-theme", "stack-data", "testpath", "typing-extensions"]
502 | kernel = ["ipykernel"]
503 | nbconvert = ["nbconvert"]
504 | nbformat = ["nbformat"]
505 | notebook = ["ipywidgets", "notebook"]
506 | parallel = ["ipyparallel"]
507 | qtconsole = ["qtconsole"]
508 | test = ["pytest (<7.1)", "pytest-asyncio", "testpath"]
509 | test-extra = ["curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.21)", "pandas", "pytest (<7.1)", "pytest-asyncio", "testpath", "trio"]
510 |
511 | [[package]]
512 | name = "isort"
513 | version = "5.13.2"
514 | description = "A Python utility / library to sort Python imports."
515 | optional = false
516 | python-versions = ">=3.8.0"
517 | files = [
518 | {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"},
519 | {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"},
520 | ]
521 |
522 | [package.extras]
523 | colors = ["colorama (>=0.4.6)"]
524 |
525 | [[package]]
526 | name = "jedi"
527 | version = "0.19.1"
528 | description = "An autocompletion tool for Python that can be used for text editors."
529 | optional = false
530 | python-versions = ">=3.6"
531 | files = [
532 | {file = "jedi-0.19.1-py2.py3-none-any.whl", hash = "sha256:e983c654fe5c02867aef4cdfce5a2fbb4a50adc0af145f70504238f18ef5e7e0"},
533 | {file = "jedi-0.19.1.tar.gz", hash = "sha256:cf0496f3651bc65d7174ac1b7d043eff454892c708a87d1b683e57b569927ffd"},
534 | ]
535 |
536 | [package.dependencies]
537 | parso = ">=0.8.3,<0.9.0"
538 |
539 | [package.extras]
540 | docs = ["Jinja2 (==2.11.3)", "MarkupSafe (==1.1.1)", "Pygments (==2.8.1)", "alabaster (==0.7.12)", "babel (==2.9.1)", "chardet (==4.0.0)", "commonmark (==0.8.1)", "docutils (==0.17.1)", "future (==0.18.2)", "idna (==2.10)", "imagesize (==1.2.0)", "mock (==1.0.1)", "packaging (==20.9)", "pyparsing (==2.4.7)", "pytz (==2021.1)", "readthedocs-sphinx-ext (==2.1.4)", "recommonmark (==0.5.0)", "requests (==2.25.1)", "six (==1.15.0)", "snowballstemmer (==2.1.0)", "sphinx (==1.8.5)", "sphinx-rtd-theme (==0.4.3)", "sphinxcontrib-serializinghtml (==1.1.4)", "sphinxcontrib-websupport (==1.2.4)", "urllib3 (==1.26.4)"]
541 | qa = ["flake8 (==5.0.4)", "mypy (==0.971)", "types-setuptools (==67.2.0.1)"]
542 | testing = ["Django", "attrs", "colorama", "docopt", "pytest (<7.0.0)"]
543 |
544 | [[package]]
545 | name = "matplotlib-inline"
546 | version = "0.1.6"
547 | description = "Inline Matplotlib backend for Jupyter"
548 | optional = false
549 | python-versions = ">=3.5"
550 | files = [
551 | {file = "matplotlib-inline-0.1.6.tar.gz", hash = "sha256:f887e5f10ba98e8d2b150ddcf4702c1e5f8b3a20005eb0f74bfdbd360ee6f304"},
552 | {file = "matplotlib_inline-0.1.6-py3-none-any.whl", hash = "sha256:f1f41aab5328aa5aaea9b16d083b128102f8712542f819fe7e6a420ff581b311"},
553 | ]
554 |
555 | [package.dependencies]
556 | traitlets = "*"
557 |
558 | [[package]]
559 | name = "mypy-extensions"
560 | version = "1.0.0"
561 | description = "Type system extensions for programs checked with the mypy type checker."
562 | optional = false
563 | python-versions = ">=3.5"
564 | files = [
565 | {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"},
566 | {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"},
567 | ]
568 |
569 | [[package]]
570 | name = "packaging"
571 | version = "23.2"
572 | description = "Core utilities for Python packages"
573 | optional = false
574 | python-versions = ">=3.7"
575 | files = [
576 | {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"},
577 | {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"},
578 | ]
579 |
580 | [[package]]
581 | name = "parso"
582 | version = "0.8.3"
583 | description = "A Python Parser"
584 | optional = false
585 | python-versions = ">=3.6"
586 | files = [
587 | {file = "parso-0.8.3-py2.py3-none-any.whl", hash = "sha256:c001d4636cd3aecdaf33cbb40aebb59b094be2a74c556778ef5576c175e19e75"},
588 | {file = "parso-0.8.3.tar.gz", hash = "sha256:8c07be290bb59f03588915921e29e8a50002acaf2cdc5fa0e0114f91709fafa0"},
589 | ]
590 |
591 | [package.extras]
592 | qa = ["flake8 (==3.8.3)", "mypy (==0.782)"]
593 | testing = ["docopt", "pytest (<6.0.0)"]
594 |
595 | [[package]]
596 | name = "pathspec"
597 | version = "0.12.1"
598 | description = "Utility library for gitignore style pattern matching of file paths."
599 | optional = false
600 | python-versions = ">=3.8"
601 | files = [
602 | {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"},
603 | {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"},
604 | ]
605 |
606 | [[package]]
607 | name = "pexpect"
608 | version = "4.9.0"
609 | description = "Pexpect allows easy control of interactive console applications."
610 | optional = false
611 | python-versions = "*"
612 | files = [
613 | {file = "pexpect-4.9.0-py2.py3-none-any.whl", hash = "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523"},
614 | {file = "pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f"},
615 | ]
616 |
617 | [package.dependencies]
618 | ptyprocess = ">=0.5"
619 |
620 | [[package]]
621 | name = "pickleshare"
622 | version = "0.7.5"
623 | description = "Tiny 'shelve'-like database with concurrency support"
624 | optional = false
625 | python-versions = "*"
626 | files = [
627 | {file = "pickleshare-0.7.5-py2.py3-none-any.whl", hash = "sha256:9649af414d74d4df115d5d718f82acb59c9d418196b7b4290ed47a12ce62df56"},
628 | {file = "pickleshare-0.7.5.tar.gz", hash = "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca"},
629 | ]
630 |
631 | [[package]]
632 | name = "platformdirs"
633 | version = "4.2.0"
634 | description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
635 | optional = false
636 | python-versions = ">=3.8"
637 | files = [
638 | {file = "platformdirs-4.2.0-py3-none-any.whl", hash = "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068"},
639 | {file = "platformdirs-4.2.0.tar.gz", hash = "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768"},
640 | ]
641 |
642 | [package.extras]
643 | docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"]
644 | test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"]
645 |
646 | [[package]]
647 | name = "pluggy"
648 | version = "1.4.0"
649 | description = "plugin and hook calling mechanisms for python"
650 | optional = false
651 | python-versions = ">=3.8"
652 | files = [
653 | {file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"},
654 | {file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"},
655 | ]
656 |
657 | [package.extras]
658 | dev = ["pre-commit", "tox"]
659 | testing = ["pytest", "pytest-benchmark"]
660 |
661 | [[package]]
662 | name = "prometheus-client"
663 | version = "0.19.0"
664 | description = "Python client for the Prometheus monitoring system."
665 | optional = false
666 | python-versions = ">=3.8"
667 | files = [
668 | {file = "prometheus_client-0.19.0-py3-none-any.whl", hash = "sha256:c88b1e6ecf6b41cd8fb5731c7ae919bf66df6ec6fafa555cd6c0e16ca169ae92"},
669 | {file = "prometheus_client-0.19.0.tar.gz", hash = "sha256:4585b0d1223148c27a225b10dbec5ae9bc4c81a99a3fa80774fa6209935324e1"},
670 | ]
671 |
672 | [package.extras]
673 | twisted = ["twisted"]
674 |
675 | [[package]]
676 | name = "prompt-toolkit"
677 | version = "3.0.43"
678 | description = "Library for building powerful interactive command lines in Python"
679 | optional = false
680 | python-versions = ">=3.7.0"
681 | files = [
682 | {file = "prompt_toolkit-3.0.43-py3-none-any.whl", hash = "sha256:a11a29cb3bf0a28a387fe5122cdb649816a957cd9261dcedf8c9f1fef33eacf6"},
683 | {file = "prompt_toolkit-3.0.43.tar.gz", hash = "sha256:3527b7af26106cbc65a040bcc84839a3566ec1b051bb0bfe953631e704b0ff7d"},
684 | ]
685 |
686 | [package.dependencies]
687 | wcwidth = "*"
688 |
689 | [[package]]
690 | name = "ptyprocess"
691 | version = "0.7.0"
692 | description = "Run a subprocess in a pseudo terminal"
693 | optional = false
694 | python-versions = "*"
695 | files = [
696 | {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"},
697 | {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"},
698 | ]
699 |
700 | [[package]]
701 | name = "pure-eval"
702 | version = "0.2.2"
703 | description = "Safely evaluate AST nodes without side effects"
704 | optional = false
705 | python-versions = "*"
706 | files = [
707 | {file = "pure_eval-0.2.2-py3-none-any.whl", hash = "sha256:01eaab343580944bc56080ebe0a674b39ec44a945e6d09ba7db3cb8cec289350"},
708 | {file = "pure_eval-0.2.2.tar.gz", hash = "sha256:2b45320af6dfaa1750f543d714b6d1c520a1688dec6fd24d339063ce0aaa9ac3"},
709 | ]
710 |
711 | [package.extras]
712 | tests = ["pytest"]
713 |
714 | [[package]]
715 | name = "pygments"
716 | version = "2.17.2"
717 | description = "Pygments is a syntax highlighting package written in Python."
718 | optional = false
719 | python-versions = ">=3.7"
720 | files = [
721 | {file = "pygments-2.17.2-py3-none-any.whl", hash = "sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c"},
722 | {file = "pygments-2.17.2.tar.gz", hash = "sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367"},
723 | ]
724 |
725 | [package.extras]
726 | plugins = ["importlib-metadata"]
727 | windows-terminal = ["colorama (>=0.4.6)"]
728 |
729 | [[package]]
730 | name = "pytest"
731 | version = "7.4.4"
732 | description = "pytest: simple powerful testing with Python"
733 | optional = false
734 | python-versions = ">=3.7"
735 | files = [
736 | {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"},
737 | {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"},
738 | ]
739 |
740 | [package.dependencies]
741 | colorama = {version = "*", markers = "sys_platform == \"win32\""}
742 | exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""}
743 | iniconfig = "*"
744 | packaging = "*"
745 | pluggy = ">=0.12,<2.0"
746 | tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""}
747 |
748 | [package.extras]
749 | testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"]
750 |
751 | [[package]]
752 | name = "pytest-cov"
753 | version = "3.0.0"
754 | description = "Pytest plugin for measuring coverage."
755 | optional = false
756 | python-versions = ">=3.6"
757 | files = [
758 | {file = "pytest-cov-3.0.0.tar.gz", hash = "sha256:e7f0f5b1617d2210a2cabc266dfe2f4c75a8d32fb89eafb7ad9d06f6d076d470"},
759 | {file = "pytest_cov-3.0.0-py3-none-any.whl", hash = "sha256:578d5d15ac4a25e5f961c938b85a05b09fdaae9deef3bb6de9a6e766622ca7a6"},
760 | ]
761 |
762 | [package.dependencies]
763 | coverage = {version = ">=5.2.1", extras = ["toml"]}
764 | pytest = ">=4.6"
765 |
766 | [package.extras]
767 | testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtualenv"]
768 |
769 | [[package]]
770 | name = "pytest-xdist"
771 | version = "3.5.0"
772 | description = "pytest xdist plugin for distributed testing, most importantly across multiple CPUs"
773 | optional = false
774 | python-versions = ">=3.7"
775 | files = [
776 | {file = "pytest-xdist-3.5.0.tar.gz", hash = "sha256:cbb36f3d67e0c478baa57fa4edc8843887e0f6cfc42d677530a36d7472b32d8a"},
777 | {file = "pytest_xdist-3.5.0-py3-none-any.whl", hash = "sha256:d075629c7e00b611df89f490a5063944bee7a4362a5ff11c7cc7824a03dfce24"},
778 | ]
779 |
780 | [package.dependencies]
781 | execnet = ">=1.1"
782 | pytest = ">=6.2.0"
783 |
784 | [package.extras]
785 | psutil = ["psutil (>=3.0)"]
786 | setproctitle = ["setproctitle"]
787 | testing = ["filelock"]
788 |
789 | [[package]]
790 | name = "requests"
791 | version = "2.31.0"
792 | description = "Python HTTP for Humans."
793 | optional = false
794 | python-versions = ">=3.7"
795 | files = [
796 | {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"},
797 | {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"},
798 | ]
799 |
800 | [package.dependencies]
801 | certifi = ">=2017.4.17"
802 | charset-normalizer = ">=2,<4"
803 | idna = ">=2.5,<4"
804 | urllib3 = ">=1.21.1,<3"
805 |
806 | [package.extras]
807 | socks = ["PySocks (>=1.5.6,!=1.5.7)"]
808 | use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"]
809 |
810 | [[package]]
811 | name = "ruff"
812 | version = "0.0.292"
813 | description = "An extremely fast Python linter, written in Rust."
814 | optional = false
815 | python-versions = ">=3.7"
816 | files = [
817 | {file = "ruff-0.0.292-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:02f29db018c9d474270c704e6c6b13b18ed0ecac82761e4fcf0faa3728430c96"},
818 | {file = "ruff-0.0.292-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:69654e564342f507edfa09ee6897883ca76e331d4bbc3676d8a8403838e9fade"},
819 | {file = "ruff-0.0.292-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c3c91859a9b845c33778f11902e7b26440d64b9d5110edd4e4fa1726c41e0a4"},
820 | {file = "ruff-0.0.292-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f4476f1243af2d8c29da5f235c13dca52177117935e1f9393f9d90f9833f69e4"},
821 | {file = "ruff-0.0.292-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:be8eb50eaf8648070b8e58ece8e69c9322d34afe367eec4210fdee9a555e4ca7"},
822 | {file = "ruff-0.0.292-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:9889bac18a0c07018aac75ef6c1e6511d8411724d67cb879103b01758e110a81"},
823 | {file = "ruff-0.0.292-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6bdfabd4334684a4418b99b3118793f2c13bb67bf1540a769d7816410402a205"},
824 | {file = "ruff-0.0.292-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aa7c77c53bfcd75dbcd4d1f42d6cabf2485d2e1ee0678da850f08e1ab13081a8"},
825 | {file = "ruff-0.0.292-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8e087b24d0d849c5c81516ec740bf4fd48bf363cfb104545464e0fca749b6af9"},
826 | {file = "ruff-0.0.292-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:f160b5ec26be32362d0774964e218f3fcf0a7da299f7e220ef45ae9e3e67101a"},
827 | {file = "ruff-0.0.292-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:ac153eee6dd4444501c4bb92bff866491d4bfb01ce26dd2fff7ca472c8df9ad0"},
828 | {file = "ruff-0.0.292-py3-none-musllinux_1_2_i686.whl", hash = "sha256:87616771e72820800b8faea82edd858324b29bb99a920d6aa3d3949dd3f88fb0"},
829 | {file = "ruff-0.0.292-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:b76deb3bdbea2ef97db286cf953488745dd6424c122d275f05836c53f62d4016"},
830 | {file = "ruff-0.0.292-py3-none-win32.whl", hash = "sha256:e854b05408f7a8033a027e4b1c7f9889563dd2aca545d13d06711e5c39c3d003"},
831 | {file = "ruff-0.0.292-py3-none-win_amd64.whl", hash = "sha256:f27282bedfd04d4c3492e5c3398360c9d86a295be00eccc63914438b4ac8a83c"},
832 | {file = "ruff-0.0.292-py3-none-win_arm64.whl", hash = "sha256:7f67a69c8f12fbc8daf6ae6d36705037bde315abf8b82b6e1f4c9e74eb750f68"},
833 | {file = "ruff-0.0.292.tar.gz", hash = "sha256:1093449e37dd1e9b813798f6ad70932b57cf614e5c2b5c51005bf67d55db33ac"},
834 | ]
835 |
836 | [[package]]
837 | name = "six"
838 | version = "1.16.0"
839 | description = "Python 2 and 3 compatibility utilities"
840 | optional = false
841 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
842 | files = [
843 | {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"},
844 | {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"},
845 | ]
846 |
847 | [[package]]
848 | name = "sniffio"
849 | version = "1.3.0"
850 | description = "Sniff out which async library your code is running under"
851 | optional = false
852 | python-versions = ">=3.7"
853 | files = [
854 | {file = "sniffio-1.3.0-py3-none-any.whl", hash = "sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384"},
855 | {file = "sniffio-1.3.0.tar.gz", hash = "sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101"},
856 | ]
857 |
858 | [[package]]
859 | name = "stack-data"
860 | version = "0.6.3"
861 | description = "Extract data from python stack frames and tracebacks for informative displays"
862 | optional = false
863 | python-versions = "*"
864 | files = [
865 | {file = "stack_data-0.6.3-py3-none-any.whl", hash = "sha256:d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695"},
866 | {file = "stack_data-0.6.3.tar.gz", hash = "sha256:836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9"},
867 | ]
868 |
869 | [package.dependencies]
870 | asttokens = ">=2.1.0"
871 | executing = ">=1.2.0"
872 | pure-eval = "*"
873 |
874 | [package.extras]
875 | tests = ["cython", "littleutils", "pygments", "pytest", "typeguard"]
876 |
877 | [[package]]
878 | name = "starlette"
879 | version = "0.37.0"
880 | description = "The little ASGI library that shines."
881 | optional = false
882 | python-versions = ">=3.8"
883 | files = [
884 | {file = "starlette-0.37.0-py3-none-any.whl", hash = "sha256:53a95037cf6a563fca942ea16ba0260edce10258c213cbd554adc263fad22dfc"},
885 | {file = "starlette-0.37.0.tar.gz", hash = "sha256:d1ec71a84fd1f691b800361a6a64ecb0e9c17ab308507ccc7f911727888293c7"},
886 | ]
887 |
888 | [package.dependencies]
889 | anyio = ">=3.4.0,<5"
890 | typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\""}
891 |
892 | [package.extras]
893 | full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart (>=0.0.7)", "pyyaml"]
894 |
895 | [[package]]
896 | name = "tomli"
897 | version = "2.0.1"
898 | description = "A lil' TOML parser"
899 | optional = false
900 | python-versions = ">=3.7"
901 | files = [
902 | {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
903 | {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
904 | ]
905 |
906 | [[package]]
907 | name = "traitlets"
908 | version = "5.14.1"
909 | description = "Traitlets Python configuration system"
910 | optional = false
911 | python-versions = ">=3.8"
912 | files = [
913 | {file = "traitlets-5.14.1-py3-none-any.whl", hash = "sha256:2e5a030e6eff91737c643231bfcf04a65b0132078dad75e4936700b213652e74"},
914 | {file = "traitlets-5.14.1.tar.gz", hash = "sha256:8585105b371a04b8316a43d5ce29c098575c2e477850b62b848b964f1444527e"},
915 | ]
916 |
917 | [package.extras]
918 | docs = ["myst-parser", "pydata-sphinx-theme", "sphinx"]
919 | test = ["argcomplete (>=3.0.3)", "mypy (>=1.7.0)", "pre-commit", "pytest (>=7.0,<7.5)", "pytest-mock", "pytest-mypy-testing"]
920 |
921 | [[package]]
922 | name = "typing-extensions"
923 | version = "4.9.0"
924 | description = "Backported and Experimental Type Hints for Python 3.8+"
925 | optional = false
926 | python-versions = ">=3.8"
927 | files = [
928 | {file = "typing_extensions-4.9.0-py3-none-any.whl", hash = "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd"},
929 | {file = "typing_extensions-4.9.0.tar.gz", hash = "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783"},
930 | ]
931 |
932 | [[package]]
933 | name = "urllib3"
934 | version = "2.2.0"
935 | description = "HTTP library with thread-safe connection pooling, file post, and more."
936 | optional = false
937 | python-versions = ">=3.8"
938 | files = [
939 | {file = "urllib3-2.2.0-py3-none-any.whl", hash = "sha256:ce3711610ddce217e6d113a2732fafad960a03fd0318c91faa79481e35c11224"},
940 | {file = "urllib3-2.2.0.tar.gz", hash = "sha256:051d961ad0c62a94e50ecf1af379c3aba230c66c710493493560c0c223c49f20"},
941 | ]
942 |
943 | [package.extras]
944 | brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"]
945 | h2 = ["h2 (>=4,<5)"]
946 | socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"]
947 | zstd = ["zstandard (>=0.18.0)"]
948 |
949 | [[package]]
950 | name = "wcwidth"
951 | version = "0.2.13"
952 | description = "Measures the displayed width of unicode strings in a terminal"
953 | optional = false
954 | python-versions = "*"
955 | files = [
956 | {file = "wcwidth-0.2.13-py2.py3-none-any.whl", hash = "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859"},
957 | {file = "wcwidth-0.2.13.tar.gz", hash = "sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5"},
958 | ]
959 |
960 | [metadata]
961 | lock-version = "2.0"
962 | python-versions = "^3.8"
963 | content-hash = "f0ddb600ac2e90288ae7436d67debc002980446f841f7e40f5b024fdf96f3f3b"
964 |
--------------------------------------------------------------------------------
/pyproject.toml:
--------------------------------------------------------------------------------
1 | [build-system]
2 | requires = ["poetry>=0.12"]
3 | build-backend = "poetry.masonry.api"
4 |
5 | [tool.poetry]
6 | name = "starlette-prometheus"
7 | version = "0.10.0"
8 | description = "Prometheus integration for Starlette"
9 | authors = ["José Antonio Perdiguero López "]
10 | license = "GPL-3.0+"
11 | readme = "README.md"
12 | repository = "https://github.com/PeRDy/starlette-prometheus"
13 | keywords = ["starlette", "prometheus", "metrics"]
14 | classifiers = [
15 | "Development Status :: 5 - Production/Stable",
16 | "Intended Audience :: Developers",
17 | "Topic :: Internet :: WWW/HTTP :: HTTP Servers",
18 | "Topic :: Software Development",
19 | "Topic :: Software Development :: Libraries",
20 | "Topic :: Software Development :: Libraries :: Application Frameworks"
21 | ]
22 | include = []
23 | exclude = []
24 |
25 | [tool.poetry.dependencies]
26 | python = "^3.8"
27 | starlette = ">=0.12.2"
28 | prometheus_client = ">=0.12"
29 |
30 | [tool.poetry.group.dev]
31 | optional = true
32 |
33 | [tool.poetry.group.dev.dependencies]
34 | httpx = "^0.26.0"
35 | isort = "^5.12"
36 | ruff = "^0.0.292"
37 | black = "^23.9"
38 | pytest = "^7.0"
39 | pytest-xdist = "^3.0"
40 | pytest-cov = "^3.0"
41 | clinner = "^1.12"
42 | ipython = "^8.0"
43 | requests = "^2.27"
44 |
45 | [tool.black]
46 | line-length = 120
47 | include = '\.pyi?$'
48 | exclude = '''
49 | /(
50 | \.git
51 | | \.venv
52 | | build
53 | | dist
54 | )/
55 | '''
56 |
57 | [tool.isort]
58 | profile = "black"
59 | atomic = true
60 | multi_line_output = 3
61 | include_trailing_comma = true
62 | line_length = 120
63 | skip_glob = [
64 | "*/.venv/**",
65 | "*/docs/**",
66 | "*/build/**",
67 | "*/dist/**",
68 | ]
69 |
70 | [tool.ruff]
71 | line-length = 120
72 | # Enable Pyflakes and pycodestyle rules.
73 | select = ["E", "F"]
74 | ignore = ["E721"]
75 | exclude = [
76 | ".git",
77 | ".pytest_cache",
78 | ".mypy_cache",
79 | ".ruff_cache",
80 | ".venv",
81 | "buck-out",
82 | "build",
83 | "dist",
84 | "node_modules",
85 | ]
86 | # Allow unused variables when underscore-prefixed.
87 | dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
88 |
89 | [tool.ruff.per-file-ignores]
90 | "__init__.py" = ["E402"]
91 |
92 | [tool.ruff.mccabe]
93 | # Unlike Flake8, default to a complexity level of 10.
94 | max-complexity = 10
95 |
96 |
--------------------------------------------------------------------------------
/setup.cfg:
--------------------------------------------------------------------------------
1 | [tool:pytest]
2 | minversion = 3
3 | addopts = --junitxml=test-results/pytest/results.xml --no-cov-on-fail --cov-report=xml --cov-report=term-missing --cov-config=setup.cfg --cov=. --pdbcls=IPython.terminal.debugger:TerminalPdb
4 | norecursedirs =
5 | *settings*
6 | *urls*
7 | .tox*
8 | *docs*
9 |
10 | [coverage:run]
11 | source = .
12 | branch = True
13 | omit =
14 | .venv*
15 | *settings*
16 | *__init__.py
17 | *__main__.py
18 | *tests*
19 | */migrations/*
20 | make
21 | examples*
22 |
23 | [coverage:report]
24 | show_missing = True
25 | ignore_errors = True
26 | fail_under = 90
27 | exclude_lines =
28 | noqa
29 | pragma: no cover
30 | pass
31 |
32 | raise AssertionError
33 | raise NotImplementedError
34 |
35 | if 0:
36 | if __name__ == .__main__.:
37 |
38 | def __repr__
39 | def __str__
40 | if cls\.debug
41 | if settings\.DEBUG
42 | if (typing\.)?TYPE_CHECKING:
43 |
44 | [coverage:paths]
45 | source = ./
46 |
47 | [coverage:html]
48 | directory = ./test-results/coverage_html/
49 |
50 | [coverage:xml]
51 | output = ./test-results/coverage.xml
52 |
53 | [isort]
54 | atomic = true
55 | multi_line_output = 3
56 | include_trailing_comma = True
57 | not_skip = __init__.py
58 | line_length = 120
59 | skip_glob =
60 | */.venv/**
61 | */.tox/**
62 | */docs/**
63 | */build/**
64 | */dist/**
65 | known_standard_library = typing
66 |
67 | [flake8]
68 | max-line-length = 120
69 | ignore = N804,W503
70 | exclude =
71 | .venv/*
72 | docs/*,
73 | build/*,
74 | dist/*,
75 | .tox/*
76 | max-complexity = 10
77 |
78 |
--------------------------------------------------------------------------------
/starlette_prometheus/__init__.py:
--------------------------------------------------------------------------------
1 | from starlette_prometheus.middleware import PrometheusMiddleware
2 | from starlette_prometheus.view import metrics
3 |
4 | __all__ = ["metrics", "PrometheusMiddleware"]
5 |
--------------------------------------------------------------------------------
/starlette_prometheus/middleware.py:
--------------------------------------------------------------------------------
1 | import time
2 | from typing import Tuple
3 |
4 | from prometheus_client import Counter, Gauge, Histogram
5 | from starlette.middleware.base import BaseHTTPMiddleware, RequestResponseEndpoint
6 | from starlette.requests import Request
7 | from starlette.responses import Response
8 | from starlette.routing import Match
9 | from starlette.status import HTTP_500_INTERNAL_SERVER_ERROR
10 | from starlette.types import ASGIApp
11 |
12 | REQUESTS = Counter(
13 | "starlette_requests_total", "Total count of requests by method and path.", ["method", "path_template"]
14 | )
15 | RESPONSES = Counter(
16 | "starlette_responses_total",
17 | "Total count of responses by method, path and status codes.",
18 | ["method", "path_template", "status_code"],
19 | )
20 | REQUESTS_PROCESSING_TIME = Histogram(
21 | "starlette_requests_processing_time_seconds",
22 | "Histogram of requests processing time by path (in seconds)",
23 | ["method", "path_template"],
24 | )
25 | EXCEPTIONS = Counter(
26 | "starlette_exceptions_total",
27 | "Total count of exceptions raised by path and exception type",
28 | ["method", "path_template", "exception_type"],
29 | )
30 | REQUESTS_IN_PROGRESS = Gauge(
31 | "starlette_requests_in_progress",
32 | "Gauge of requests by method and path currently being processed",
33 | ["method", "path_template"],
34 | )
35 |
36 |
37 | class PrometheusMiddleware(BaseHTTPMiddleware):
38 | def __init__(self, app: ASGIApp, filter_unhandled_paths: bool = False) -> None:
39 | super().__init__(app)
40 | self.filter_unhandled_paths = filter_unhandled_paths
41 |
42 | async def dispatch(self, request: Request, call_next: RequestResponseEndpoint) -> Response:
43 | method = request.method
44 | path_template, is_handled_path = self.get_path_template(request)
45 |
46 | if self._is_path_filtered(is_handled_path):
47 | return await call_next(request)
48 |
49 | REQUESTS_IN_PROGRESS.labels(method=method, path_template=path_template).inc()
50 | REQUESTS.labels(method=method, path_template=path_template).inc()
51 | before_time = time.perf_counter()
52 | try:
53 | response = await call_next(request)
54 | except BaseException as e:
55 | status_code = HTTP_500_INTERNAL_SERVER_ERROR
56 | EXCEPTIONS.labels(method=method, path_template=path_template, exception_type=type(e).__name__).inc()
57 | raise e from None
58 | else:
59 | status_code = response.status_code
60 | after_time = time.perf_counter()
61 | REQUESTS_PROCESSING_TIME.labels(method=method, path_template=path_template).observe(
62 | after_time - before_time
63 | )
64 | finally:
65 | RESPONSES.labels(method=method, path_template=path_template, status_code=status_code).inc()
66 | REQUESTS_IN_PROGRESS.labels(method=method, path_template=path_template).dec()
67 |
68 | return response
69 |
70 | @staticmethod
71 | def get_path_template(request: Request) -> Tuple[str, bool]:
72 | for route in request.app.routes:
73 | match, child_scope = route.matches(request.scope)
74 | if match == Match.FULL:
75 | return route.path, True
76 |
77 | return request.url.path, False
78 |
79 | def _is_path_filtered(self, is_handled_path: bool) -> bool:
80 | return self.filter_unhandled_paths and not is_handled_path
81 |
--------------------------------------------------------------------------------
/starlette_prometheus/py.typed:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/perdy/starlette-prometheus/3d2f82e136116c78c66db653b6f6a0b262ad6d89/starlette_prometheus/py.typed
--------------------------------------------------------------------------------
/starlette_prometheus/view.py:
--------------------------------------------------------------------------------
1 | import os
2 |
3 | from prometheus_client import CONTENT_TYPE_LATEST, REGISTRY, CollectorRegistry, generate_latest
4 | from prometheus_client.multiprocess import MultiProcessCollector
5 | from starlette.requests import Request
6 | from starlette.responses import Response
7 |
8 |
9 | def metrics(request: Request) -> Response:
10 | if "prometheus_multiproc_dir" in os.environ:
11 | registry = CollectorRegistry()
12 | MultiProcessCollector(registry)
13 | else:
14 | registry = REGISTRY
15 |
16 | return Response(generate_latest(registry), headers={"Content-Type": CONTENT_TYPE_LATEST})
17 |
--------------------------------------------------------------------------------
/tests/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/perdy/starlette-prometheus/3d2f82e136116c78c66db653b6f6a0b262ad6d89/tests/__init__.py
--------------------------------------------------------------------------------
/tests/test_end_to_end.py:
--------------------------------------------------------------------------------
1 | import pytest
2 | from starlette.applications import Starlette
3 | from starlette.responses import PlainTextResponse
4 | from starlette.testclient import TestClient
5 |
6 | from starlette_prometheus import PrometheusMiddleware, metrics
7 |
8 |
9 | class TestCasePrometheusMiddleware:
10 | @pytest.fixture(scope="class")
11 | def app(self):
12 | app_ = Starlette()
13 | app_.add_middleware(PrometheusMiddleware)
14 | app_.add_route("/metrics/", metrics)
15 |
16 | @app_.route("/foo/")
17 | def foo(request):
18 | return PlainTextResponse("Foo")
19 |
20 | @app_.route("/bar/")
21 | def bar(request):
22 | raise ValueError("bar")
23 |
24 | @app_.route("/foo/{bar}/")
25 | def foobar(request):
26 | return PlainTextResponse(f"Foo: {request.path_params['bar']}")
27 |
28 | return app_
29 |
30 | @pytest.fixture
31 | def client(self, app):
32 | return TestClient(app)
33 |
34 | def test_view_ok(self, client):
35 | # Do a request
36 | client.get("/foo/")
37 |
38 | # Get metrics
39 | response = client.get("/metrics/")
40 | metrics_text = response.content.decode()
41 |
42 | # Asserts: Requests
43 | assert 'starlette_requests_total{method="GET",path_template="/foo/"} 1.0' in metrics_text
44 |
45 | # Asserts: Responses
46 | assert 'starlette_responses_total{method="GET",path_template="/foo/",status_code="200"} 1.0' in metrics_text
47 |
48 | # Asserts: Requests in progress
49 | assert 'starlette_requests_in_progress{method="GET",path_template="/foo/"} 0.0' in metrics_text
50 | assert 'starlette_requests_in_progress{method="GET",path_template="/metrics/"} 1.0' in metrics_text
51 |
52 | def test_view_exception(self, client):
53 | # Do a request
54 | with pytest.raises(ValueError):
55 | client.get("/bar/")
56 |
57 | # Get metrics
58 | response = client.get("/metrics/")
59 | metrics_text = response.content.decode()
60 |
61 | # Asserts: Requests
62 | assert 'starlette_requests_total{method="GET",path_template="/bar/"} 1.0' in metrics_text
63 |
64 | # Asserts: Responses
65 | assert (
66 | "starlette_exceptions_total{"
67 | 'exception_type="ValueError",method="GET",path_template="/bar/"'
68 | "} 1.0" in metrics_text
69 | )
70 | assert (
71 | "starlette_responses_total{" 'method="GET",path_template="/bar/",status_code="500"' "} 1.0" in metrics_text
72 | )
73 |
74 | # Asserts: Requests in progress
75 | assert 'starlette_requests_in_progress{method="GET",path_template="/bar/"} 0.0' in metrics_text
76 | assert 'starlette_requests_in_progress{method="GET",path_template="/metrics/"} 1.0' in metrics_text
77 |
78 | def test_path_substitution(self, client):
79 | # Do a request
80 | client.get("/foo/baz/")
81 |
82 | # Get metrics
83 | response = client.get("/metrics/")
84 | metrics_text = response.content.decode()
85 |
86 | # Asserts: Headers
87 | assert response.headers["content-type"] == "text/plain; version=0.0.4; charset=utf-8"
88 |
89 | # Asserts: Requests
90 | assert 'starlette_requests_total{method="GET",path_template="/foo/{bar}/"} 1.0' in metrics_text
91 |
92 | # Asserts: Responses
93 | assert (
94 | 'starlette_responses_total{method="GET",path_template="/foo/{bar}/",status_code="200"} 1.0' in metrics_text
95 | )
96 |
97 | # Asserts: Requests in progress
98 | assert 'starlette_requests_in_progress{method="GET",path_template="/foo/{bar}/"} 0.0' in metrics_text
99 | assert 'starlette_requests_in_progress{method="GET",path_template="/metrics/"} 1.0' in metrics_text
100 |
101 | def test_unhandled_paths(self, client):
102 | # Do a request
103 | client.get("/any/unhandled/path")
104 |
105 | # Get metrics
106 | response = client.get("/metrics/")
107 | metrics_text = response.content.decode()
108 |
109 | # Asserts: Requests
110 | assert 'starlette_requests_total{method="GET",path_template="/any/unhandled/path"} 1.0' in metrics_text
111 |
112 | # Asserts: Responses
113 | assert (
114 | 'starlette_responses_total{method="GET",path_template="/any/unhandled/path",status_code="404"} 1.0'
115 | in metrics_text
116 | )
117 |
118 | # Asserts: Requests in progress
119 | assert 'starlette_requests_in_progress{method="GET",path_template="/any/unhandled/path"} 0.0' in metrics_text
120 | assert 'starlette_requests_in_progress{method="GET",path_template="/metrics/"} 1.0' in metrics_text
121 |
122 |
123 | class TestCasePrometheusMiddlewareFilterUnhandledPaths:
124 | @pytest.fixture(scope="class")
125 | def app(self):
126 | app_ = Starlette()
127 | app_.add_middleware(PrometheusMiddleware, filter_unhandled_paths=True)
128 | app_.add_route("/metrics/", metrics)
129 |
130 | return app_
131 |
132 | @pytest.fixture
133 | def client(self, app):
134 | return TestClient(app)
135 |
136 | def test_filter_unhandled_paths(self, client):
137 | # Do a request
138 | path = "/other/unhandled/path"
139 | client.get(path)
140 |
141 | # Get metrics
142 | response = client.get("/metrics/")
143 | metrics_text = response.content.decode()
144 |
145 | # Asserts: metric is filtered
146 | assert path not in metrics_text
147 |
148 | # Asserts: Requests in progress
149 | assert 'starlette_requests_in_progress{method="GET",path_template="/metrics/"} 1.0' in metrics_text
150 |
--------------------------------------------------------------------------------