Skip to main content

Apitally logo

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.io

Apitally screenshots


Apitally client for Python

Tests Codecov PyPI

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)

Source distribution for apitally 0.1.2
File Size Uploaded
apitally-0.1.2.tar.gz 15.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for apitally 0.1.2
File Interpreter ABI Platform
apitally-0.1.2-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

0.25.1

2 release files

0.24.4

2 release files

0.24.3

2 release files

0.24.1

2 release files

0.24.0

2 release files

0.23.0

2 release files

0.22.3

2 release files

0.22.0

2 release files

0.21.4

2 release files

0.21.2

2 release files

0.21.1

2 release files

0.21.0

2 release files

0.20.3

2 release files

0.20.2

2 release files

0.20.0

2 release files

0.19.1

2 release files

0.19.0

2 release files

0.18.2

2 release files

0.18.1

2 release files

0.18.0

2 release files

0.17.0

2 release files

0.16.1

2 release files

0.16.0

2 release files

0.15.1

2 release files

0.15.0

2 release files

0.14.5

2 release files

0.14.2

2 release files

0.14.1

2 release files

0.12.1

2 release files

0.12.0

2 release files

0.11.3

2 release files

0.11.2

2 release files

0.11.1

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page