No project description provided
Project description
i8t instruments Python code to send checkpoints to i8t server.
Installation
pip install i8t
Usage
i8t can be used in a few ways:
Instrument all inbound web requests (currently only Flask is supported):
import flask import requests from i8t.instrument.flask_introspect import FlaskIntrospect app = flask.Flask(__name__) app.route("/test", methods=["POST"]) def test_route(): return "Test Response", 200 introspect_client = IntrospectClient( session=requests.Session(), api_url="https://api.demin.dev/i8t/checkpoints/unique-tenant-id", name="app", ) flask_introspect = FlaskIntrospect(introspect_client) flask_introspect.register(app)Instrument all outbound HTTP requests (currently only requests is supported):
import requests from i8t.instrument.requests_introspect import RequestsIntrospect introspect_client = IntrospectClient( session=requests.Session(), api_url="https://api.demin.dev/i8t/checkpoints/unique-tenant-id", name="app", ) requests_introspect = RequestsIntrospect(introspect_client) requests_introspect.register()Decorate any function to send its inputs and outputs:
from i8t.client import IntrospectClient, IntrospectDecorator, introspect @introspect def test_func(first, second): return first + second introspect_client = IntrospectClient( session=requests.Session(), api_url="https://api.demin.dev/i8t/checkpoints/unique-tenant-id", name="app", ) decorator = IntrospectDecorator(introspect_client) decorator.register()
Once initialized, the inputs and outputs of the instrumented calls are sent to the i8t server, where they can be later fetched at the same URL.
The fetched call checkpoints can be used to set up canned tests.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file i8t-0.0.12.tar.gz.
File metadata
- Download URL: i8t-0.0.12.tar.gz
- Upload date:
- Size: 20.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0628759f3cba92e18390ad21bdc457c50b315c7b2c2eda72e1a7dc518c7b087
|
|
| MD5 |
e3e20f82414b76c060ddcf0e46438d59
|
|
| BLAKE2b-256 |
be9a73f7f790f5965ce064c3d6ad7d45031474ccb1ee5514b3e748f54e93f2de
|
File details
Details for the file i8t-0.0.12-py2.py3-none-any.whl.
File metadata
- Download URL: i8t-0.0.12-py2.py3-none-any.whl
- Upload date:
- Size: 21.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2dad1079c7bf30c1493fffe746c9f398970cb58dc0fcff4958788f4cf8716230
|
|
| MD5 |
19876762cc9bd3f8f48185a6b0d94b86
|
|
| BLAKE2b-256 |
a6a3f45faa2277c32122d4c84990e37d835f225c90a38707bc932a8bac84b8d0
|