Skip to main content

No project description provided

Project description

https://img.shields.io/pypi/v/i8t.svg https://img.shields.io/pypi/pyversions/i8t.svg tests Code style: Black

i8t instruments Python code to send checkpoints to i8t server.

Installation

pip install i8t

Usage

i8t can be used in a few ways:

  1. Instrument all inbound web requests (currently only Flask is supported):

    import flask
    import requests
    from i8t.instrument.flask_introspection import FlaskIntrospection
    
    app = flask.Flask(__name__)
    
    app.route("/test", methods=["POST"])
    def test_route():
        return "Test Response", 200
    
    introspection_client = IntrospectionClient(
        session=requests.Session(),
        api_url="https://api.demin.dev/i8t/checkpoints/unique-tenant-id",
        name="app",
    )
    flask_introspection = FlaskIntrospection(introspection_client)
    flask_introspection.register(app)
  2. Instrument all outbound HTTP requests (currently only requests is supported):

    import requests
    from i8t.instrument.requests_introspection import RequestsIntrospection
    
    introspection_client = IntrospectionClient(
        session=requests.Session(),
        api_url="https://api.demin.dev/i8t/checkpoints/unique-tenant-id",
        name="app",
    )
    requests_introspection = RequestsIntrospection(introspection_client)
    requests_introspection.register()
  3. Decorate any function to send its inputs and outputs:

    from i8t.client import IntrospectionClient, IntrospectionDecorator, introspect
    
    @introspect
    def test_func(first, second):
        return first + second
    
    introspection_client = IntrospectionClient(
        session=requests.Session(),
        api_url="https://api.demin.dev/i8t/checkpoints/unique-tenant-id",
        name="app",
    )
    decorator = IntrospectionDecorator(introspection_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

i8t-0.0.1.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

i8t-0.0.1-py2.py3-none-any.whl (8.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file i8t-0.0.1.tar.gz.

File metadata

  • Download URL: i8t-0.0.1.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.19

File hashes

Hashes for i8t-0.0.1.tar.gz
Algorithm Hash digest
SHA256 fed9021a772c143e3557e5a733a46d974f5789ed221e8f0388bf17e004c1a9dd
MD5 55eef2b74ba948a54b4ee1e87611094a
BLAKE2b-256 3f61c08d103489372245bb90ceabe4146980db47da0ed8ed936806dd7817b7b7

See more details on using hashes here.

File details

Details for the file i8t-0.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: i8t-0.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.19

File hashes

Hashes for i8t-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c151f2b7acc63bd0917cb16933e08596b5730752d471ad32492e67bf785257cf
MD5 d529c569a7fff4de3aeb221b177d9081
BLAKE2b-256 c3c55fe4f249b61b5dc69e045c54867c785d65d5b2fdda511a2ff7b02849519d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page