apitally 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- apitally/__init__.py +1 -1
- apitally-0.1.1.dist-info/METADATA +163 -0
- {apitally-0.1.0.dist-info → apitally-0.1.1.dist-info}/RECORD +5 -5
- apitally-0.1.0.dist-info/METADATA +0 -118
- {apitally-0.1.0.dist-info → apitally-0.1.1.dist-info}/LICENSE +0 -0
- {apitally-0.1.0.dist-info → apitally-0.1.1.dist-info}/WHEEL +0 -0
apitally/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.1.
|
1
|
+
__version__ = "0.1.1"
|
@@ -0,0 +1,163 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: apitally
|
3
|
+
Version: 0.1.1
|
4
|
+
Summary: Apitally client library for Python
|
5
|
+
Home-page: https://docs.apitally.io
|
6
|
+
License: MIT
|
7
|
+
Author: Apitally
|
8
|
+
Author-email: hello@apitally.io
|
9
|
+
Requires-Python: >=3.8,<4.0
|
10
|
+
Classifier: Framework :: Django
|
11
|
+
Classifier: Framework :: FastAPI
|
12
|
+
Classifier: Framework :: Flask
|
13
|
+
Classifier: Intended Audience :: Developers
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
16
|
+
Classifier: Programming Language :: Python :: 3.8
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
20
|
+
Provides-Extra: django-ninja
|
21
|
+
Provides-Extra: django-rest-framework
|
22
|
+
Provides-Extra: fastapi
|
23
|
+
Provides-Extra: flask
|
24
|
+
Provides-Extra: starlette
|
25
|
+
Requires-Dist: backoff (>=2.0.0)
|
26
|
+
Requires-Dist: django (>=4.0) ; extra == "django-rest-framework" or extra == "django-ninja"
|
27
|
+
Requires-Dist: django-ninja (>=0.18.0) ; extra == "django-ninja"
|
28
|
+
Requires-Dist: djangorestframework (>=3.12.0) ; extra == "django-rest-framework"
|
29
|
+
Requires-Dist: fastapi (>=0.87.0) ; extra == "fastapi"
|
30
|
+
Requires-Dist: flask (>=2.0.0) ; extra == "flask"
|
31
|
+
Requires-Dist: httpx (>=0.22.0) ; extra == "fastapi" or extra == "starlette"
|
32
|
+
Requires-Dist: requests (>=2.26.0) ; extra == "django-rest-framework" or extra == "django-ninja" or extra == "flask"
|
33
|
+
Requires-Dist: starlette (>=0.21.0) ; extra == "fastapi" or extra == "starlette"
|
34
|
+
Project-URL: Documentation, https://docs.apitally.io
|
35
|
+
Project-URL: Repository, https://github.com/apitally/python-client
|
36
|
+
Description-Content-Type: text/markdown
|
37
|
+
|
38
|
+
<p align="center">
|
39
|
+
<picture>
|
40
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/apitally/assets/main/logo-vertical-dark.png">
|
41
|
+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/apitally/assets/main/logo-vertical-light.png">
|
42
|
+
<img alt="Apitally logo" src="https://raw.githubusercontent.com/apitally/assets/main/logo-vertical-light.png">
|
43
|
+
</picture>
|
44
|
+
</p>
|
45
|
+
|
46
|
+
<p align="center"><b>Your refreshingly simple REST API companion.</b></p>
|
47
|
+
|
48
|
+
<p align="center"><i>Apitally offers API traffic monitoring and integrated API key management that is extremely easy to set up and use with new and existing API projects. No assumptions made about your infrastructure, no extra tools for you to host and maintain.</i></p>
|
49
|
+
|
50
|
+
<p align="center">🔗 <b><a href="https://apitally.io" target="_blank">apitally.io</a></b></p>
|
51
|
+
|
52
|
+

|
53
|
+
|
54
|
+
---
|
55
|
+
|
56
|
+
# Apitally client for Python
|
57
|
+
|
58
|
+
[](https://github.com/apitally/python-client/actions)
|
59
|
+
[](https://codecov.io/gh/apitally/python-client)
|
60
|
+
[](https://pypi.org/project/apitally/)
|
61
|
+
|
62
|
+
This client library currently supports the following frameworks:
|
63
|
+
|
64
|
+
- [FastAPI](https://docs.apitally.io/frameworks/fastapi)
|
65
|
+
- [Starlette](https://docs.apitally.io/frameworks/starlette)
|
66
|
+
- [Flask](https://docs.apitally.io/frameworks/flask)
|
67
|
+
- [Django Ninja](https://docs.apitally.io/frameworks/django-ninja)
|
68
|
+
- [Django REST Framework](https://docs.apitally.io/frameworks/django-rest-framework)
|
69
|
+
|
70
|
+
## Install
|
71
|
+
|
72
|
+
Use `pip` to install and provide your framework of choice as an extra, for example:
|
73
|
+
|
74
|
+
```bash
|
75
|
+
pip install apitally[fastapi]
|
76
|
+
```
|
77
|
+
|
78
|
+
The available extras are: `fastapi`, `starlette`, `flask`, `django_ninja` and `django_rest_framework`.
|
79
|
+
|
80
|
+
## Usage
|
81
|
+
|
82
|
+
Below are basic usage examples for each supported framework. For further instructions and examples, including how to identify consumers and use API key authentication, check out our [documentation](https://docs.apitally.io/).
|
83
|
+
|
84
|
+
### FastAPI
|
85
|
+
|
86
|
+
```python
|
87
|
+
from fastapi import FastAPI
|
88
|
+
from apitally.fastapi import ApitallyMiddleware
|
89
|
+
|
90
|
+
app = FastAPI()
|
91
|
+
app.add_middleware(
|
92
|
+
ApitallyMiddleware,
|
93
|
+
client_id="your-client-id",
|
94
|
+
env="your-env-name",
|
95
|
+
)
|
96
|
+
```
|
97
|
+
|
98
|
+
### Starlette
|
99
|
+
|
100
|
+
```python
|
101
|
+
from starlette.applications import Starlette
|
102
|
+
from apitally.starlette import ApitallyMiddleware
|
103
|
+
|
104
|
+
app = Starlette(routes=[...])
|
105
|
+
app.add_middleware(
|
106
|
+
ApitallyMiddleware,
|
107
|
+
client_id="your-client-id",
|
108
|
+
env="your-env-name",
|
109
|
+
)
|
110
|
+
```
|
111
|
+
|
112
|
+
### Flask
|
113
|
+
|
114
|
+
```python
|
115
|
+
from flask import Flask
|
116
|
+
from apitally.flask import ApitallyMiddleware
|
117
|
+
|
118
|
+
app = Flask(__name__)
|
119
|
+
app.wsgi_app = ApitallyMiddleware(
|
120
|
+
app,
|
121
|
+
client_id="your-client-id",
|
122
|
+
env="your-env-name",
|
123
|
+
)
|
124
|
+
```
|
125
|
+
|
126
|
+
### Django Ninja
|
127
|
+
|
128
|
+
In your Django `settings.py` file:
|
129
|
+
|
130
|
+
```python
|
131
|
+
MIDDLEWARE = [
|
132
|
+
# Other middlewares first ...
|
133
|
+
"apitally.django_ninja.ApitallyMiddleware",
|
134
|
+
]
|
135
|
+
APITALLY_MIDDLEWARE = {
|
136
|
+
"client_id": "your-client-id",
|
137
|
+
"env": "your-env-name",
|
138
|
+
}
|
139
|
+
```
|
140
|
+
|
141
|
+
### Django REST Framework
|
142
|
+
|
143
|
+
In your Django `settings.py` file:
|
144
|
+
|
145
|
+
```python
|
146
|
+
MIDDLEWARE = [
|
147
|
+
# Other middlewares first ...
|
148
|
+
"apitally.django_rest_framework.ApitallyMiddleware",
|
149
|
+
]
|
150
|
+
APITALLY_MIDDLEWARE = {
|
151
|
+
"client_id": "your-client-id",
|
152
|
+
"env": "your-env-name",
|
153
|
+
}
|
154
|
+
```
|
155
|
+
|
156
|
+
## Getting help
|
157
|
+
|
158
|
+
If you need help please join our [Apitally community on Slack](https://apitally-community.slack.com/) or [create a new discussion](https://github.com/orgs/apitally/discussions/categories/q-a) on GitHub.
|
159
|
+
|
160
|
+
## License
|
161
|
+
|
162
|
+
This library is licensed under the terms of the MIT license.
|
163
|
+
|
@@ -1,4 +1,4 @@
|
|
1
|
-
apitally/__init__.py,sha256=
|
1
|
+
apitally/__init__.py,sha256=rnObPjuBcEStqSO0S6gsdS_ot8ITOQjVj_-P1LUUYpg,22
|
2
2
|
apitally/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
apitally/client/asyncio.py,sha256=v2ymZFBwdXgh8_OyMdzkeWapeJWFsTykjz71E5ti2kA,3509
|
4
4
|
apitally/client/base.py,sha256=N7fvWQZt_0nPAoNCzGBjDLTl_KTX7EytG-pHdvaFV_4,9268
|
@@ -10,7 +10,7 @@ apitally/fastapi.py,sha256=YjnrRis8UG2M6Q3lkwizbtDXU7nPfCA4mebxG8XwveY,3334
|
|
10
10
|
apitally/flask.py,sha256=n8p6Wp4gP9XaFR2i0uvg9CVICQEfO9uhmtliQe45CYA,6354
|
11
11
|
apitally/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
12
|
apitally/starlette.py,sha256=K4XwdfKSWmOCLmEtduoEFXIgKh81ASnELEa7MwNgxR8,8784
|
13
|
-
apitally-0.1.
|
14
|
-
apitally-0.1.
|
15
|
-
apitally-0.1.
|
16
|
-
apitally-0.1.
|
13
|
+
apitally-0.1.1.dist-info/LICENSE,sha256=vbLzC-4TddtXX-_AFEBKMYWRlxC_MN0g66QhPxo8PgY,1065
|
14
|
+
apitally-0.1.1.dist-info/METADATA,sha256=11f1gQx4saYKb5qjVDt19RK2CO2vUe6wgsKWvW-bzng,5453
|
15
|
+
apitally-0.1.1.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
16
|
+
apitally-0.1.1.dist-info/RECORD,,
|
@@ -1,118 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: apitally
|
3
|
-
Version: 0.1.0
|
4
|
-
Summary: Apitally client library for Python
|
5
|
-
Home-page: https://github.com/apitally/apitally-python
|
6
|
-
License: MIT
|
7
|
-
Author: Simon Gurcke
|
8
|
-
Author-email: simon@gurcke.de
|
9
|
-
Requires-Python: >=3.8,<4.0
|
10
|
-
Classifier: License :: OSI Approved :: MIT License
|
11
|
-
Classifier: Programming Language :: Python :: 3
|
12
|
-
Classifier: Programming Language :: Python :: 3.8
|
13
|
-
Classifier: Programming Language :: Python :: 3.9
|
14
|
-
Classifier: Programming Language :: Python :: 3.10
|
15
|
-
Classifier: Programming Language :: Python :: 3.11
|
16
|
-
Provides-Extra: django-ninja
|
17
|
-
Provides-Extra: django-rest-framework
|
18
|
-
Provides-Extra: fastapi
|
19
|
-
Provides-Extra: flask
|
20
|
-
Provides-Extra: starlette
|
21
|
-
Requires-Dist: backoff (>=2.0.0)
|
22
|
-
Requires-Dist: django (>=4.0) ; extra == "django-rest-framework" or extra == "django-ninja"
|
23
|
-
Requires-Dist: django-ninja (>=0.18.0) ; extra == "django-ninja"
|
24
|
-
Requires-Dist: djangorestframework (>=3.12.0) ; extra == "django-rest-framework"
|
25
|
-
Requires-Dist: fastapi (>=0.87.0) ; extra == "fastapi"
|
26
|
-
Requires-Dist: flask (>=2.0.0) ; extra == "flask"
|
27
|
-
Requires-Dist: httpx (>=0.22.0) ; extra == "fastapi" or extra == "starlette"
|
28
|
-
Requires-Dist: requests (>=2.26.0) ; extra == "django-rest-framework" or extra == "django-ninja" or extra == "flask"
|
29
|
-
Requires-Dist: starlette (>=0.21.0) ; extra == "fastapi" or extra == "starlette"
|
30
|
-
Project-URL: Repository, https://github.com/apitally/apitally-python
|
31
|
-
Description-Content-Type: text/markdown
|
32
|
-
|
33
|
-
# Apitally client for Python
|
34
|
-
|
35
|
-
[](https://github.com/apitally/python-client/actions)
|
36
|
-
[](https://codecov.io/gh/apitally/python-client)
|
37
|
-
[](https://pypi.org/project/apitally/)
|
38
|
-
|
39
|
-
Apitally client library for Python.
|
40
|
-
|
41
|
-
Currently supports the following frameworks:
|
42
|
-
|
43
|
-
- [FastAPI](https://fastapi.tiangolo.com/)
|
44
|
-
- [Starlette](https://www.starlette.io/)
|
45
|
-
- [Django Ninja](https://django-ninja.rest-framework.com/)
|
46
|
-
- [Django REST Framework](https://www.django-rest-framework.org/)
|
47
|
-
- [Flask](https://flask.palletsprojects.com/)
|
48
|
-
|
49
|
-
## Installation
|
50
|
-
|
51
|
-
Use `pip` to install and provide your framework of choice as an extra, for example:
|
52
|
-
|
53
|
-
```bash
|
54
|
-
pip install apitally[fastapi]
|
55
|
-
```
|
56
|
-
|
57
|
-
The available extras are: `fastapi`, `starlette`, `django_ninja`, `django_rest_framework` and `flask`.
|
58
|
-
|
59
|
-
## Basic usage
|
60
|
-
|
61
|
-
Below are basic usage examples for each supported framework. For more detailed instructions and examples, including on how to use Apitally API key authentication, see the [documentation](https://docs.apitally.com/).
|
62
|
-
|
63
|
-
### With FastAPI
|
64
|
-
|
65
|
-
```python
|
66
|
-
from fastapi import FastAPI
|
67
|
-
from apitally.fastapi import ApitallyMiddleware
|
68
|
-
|
69
|
-
app = FastAPI()
|
70
|
-
app.add_middleware(ApitallyMiddleware, client_id="<your-client-id>")
|
71
|
-
```
|
72
|
-
|
73
|
-
### With Starlette
|
74
|
-
|
75
|
-
```python
|
76
|
-
from starlette.applications import Starlette
|
77
|
-
from apitally.starlette import ApitallyMiddleware
|
78
|
-
|
79
|
-
app = Starlette()
|
80
|
-
app.add_middleware(ApitallyMiddleware, client_id="<your-client-id>")
|
81
|
-
```
|
82
|
-
|
83
|
-
### With Django Ninja
|
84
|
-
|
85
|
-
In your Django `settings.py` file:
|
86
|
-
|
87
|
-
```python
|
88
|
-
MIDDLEWARE = [
|
89
|
-
"apitally.django_ninja.ApitallyMiddleware",
|
90
|
-
]
|
91
|
-
APITALLY_MIDDLEWARE = {
|
92
|
-
"client_id": "<your-client-id>",
|
93
|
-
}
|
94
|
-
```
|
95
|
-
|
96
|
-
### With Django REST Framework
|
97
|
-
|
98
|
-
In your Django `settings.py` file:
|
99
|
-
|
100
|
-
```python
|
101
|
-
MIDDLEWARE = [
|
102
|
-
"apitally.django_rest_framework.ApitallyMiddleware",
|
103
|
-
]
|
104
|
-
APITALLY_MIDDLEWARE = {
|
105
|
-
"client_id": "<your-client-id>",
|
106
|
-
}
|
107
|
-
```
|
108
|
-
|
109
|
-
### With Flask
|
110
|
-
|
111
|
-
```python
|
112
|
-
from flask import Flask
|
113
|
-
from apitally.flask import ApitallyMiddleware
|
114
|
-
|
115
|
-
app = Flask(__name__)
|
116
|
-
app.wsgi_app = ApitallyMiddleware(app, client_id="<your-client-id>")
|
117
|
-
```
|
118
|
-
|
File without changes
|
File without changes
|