Your refreshingly simple REST API companion.
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.
Apitally client for Python
This client library currently supports the following frameworks:
Install
Use pip to install and provide your framework of choice as an extra, for example:
pip install apitally[fastapi]
The available extras are: fastapi, starlette, flask, django_ninja and django_rest_framework.
Usage
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.
FastAPI
from fastapi import FastAPI
from apitally.fastapi import ApitallyMiddleware
app = FastAPI()
app.add_middleware(
ApitallyMiddleware,
client_id="your-client-id",
env="your-env-name",
)
Starlette
from starlette.applications import Starlette
from apitally.starlette import ApitallyMiddleware
app = Starlette(routes=[...])
app.add_middleware(
ApitallyMiddleware,
client_id="your-client-id",
env="your-env-name",
)
Flask
from flask import Flask
from apitally.flask import ApitallyMiddleware
app = Flask(__name__)
app.wsgi_app = ApitallyMiddleware(
app,
client_id="your-client-id",
env="your-env-name",
)
Django Ninja
In your Django settings.py file:
MIDDLEWARE = [
# Other middlewares first ...
"apitally.django_ninja.ApitallyMiddleware",
]
APITALLY_MIDDLEWARE = {
"client_id": "your-client-id",
"env": "your-env-name",
}
Django REST Framework
In your Django settings.py file:
MIDDLEWARE = [
# Other middlewares first ...
"apitally.django_rest_framework.ApitallyMiddleware",
]
APITALLY_MIDDLEWARE = {
"client_id": "your-client-id",
"env": "your-env-name",
}
Getting help
If you need help please join our Apitally community on Slack or create a new discussion on GitHub.
License
This library is licensed under the terms of the MIT license.
Metadata
Release files for apitally 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| apitally-0.1.2.tar.gz | 15.5 kB | Without provenance | Details for apitally-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| apitally-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for apitally-0.1.2-py3-none-any.whl |
Total release size: 35.5 kB
Release files / apitally-0.1.2.tar.gz
| Download URL | apitally-0.1.2.tar.gz |
|---|---|
| Size | 15.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
25e8467c4a4439e6721dac7a7a58dc5a0a009875ede22e5f011a3f654ea65888
|
|
BLAKE2b-256 checksum How to use checksums |
72e7af7eeeaf9e07598a07e3a2c5c28611149c8d81d788f809c6e04d146e8c6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.12 Linux/6.2.0-1014-azure
|
Release files / apitally-0.1.2-py3-none-any.whl
| Download URL | apitally-0.1.2-py3-none-any.whl |
|---|---|
| Size | 20.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5d57495993771bf25eac5538ad64aeadc89f5ed7693e0ffa8e68e6440286710
|
|
BLAKE2b-256 checksum How to use checksums |
3959e0d5d040d1ca11cb3dfe6fe5f9216c5f2201fba147d0c37821844ac461e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.12 Linux/6.2.0-1014-azure
|
Security for apitally 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.