Skip to main content

Python Code Injection Library

Project description

https://api.travis-ci.com/Maltzur/injectify.svg?branch=master https://codecov.io/gh/Maltzur/injectify/branch/master/graphs/badge.svg?branch=master https://img.shields.io/scrutinizer/g/Maltzur/injectify.svg

A code injection library for Python.

Basic Example:

from injectify import inject, HeadInjector

def foo(x):
    return x

print(foo(10))  # 10

@inject(target=foo, injector=HeadInjector())
def handler():
    x = 9000

print(foo(10))  # 9000

Supported Features

Injection is ready to inject code into different kinds of objects.

  • Inject into functions

  • Inject into methods

  • Inject into nested functions

  • Inject into classes

  • Inject into modules

Installation

The recommended way to install injectify is to use pipenv (or pip, of course):

$ pipenv install injectify
Adding injectify to Pipfile's [packages]…
✔ Installation Succeeded
…

Injectify officially supports Python 3.5+.

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

injectify-0.1.1.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

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

injectify-0.1.1-py2.py3-none-any.whl (7.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file injectify-0.1.1.tar.gz.

File metadata

  • Download URL: injectify-0.1.1.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.0

File hashes

Hashes for injectify-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c301d0f51861415885fa555c266606ce55b7bba9cf4ee5ecca049a050f5fbfaa
MD5 6cb175bc8c6cde539f3a0d9846d583e8
BLAKE2b-256 91708bd361114a166fd1fe0e571722213b76edb3e8200b0a9c4d58fe24c188e0

See more details on using hashes here.

File details

Details for the file injectify-0.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: injectify-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.0

File hashes

Hashes for injectify-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a6345f1c5dbd470aec9b5dff99cddb626a063b82867212c7eb3e7023b8d020cc
MD5 08837ba1d3be917defcd35448d46e1a6
BLAKE2b-256 b53ea1d5e434264a40be78b83fdc142ffe7e9518f7553530c00aaf8ba3123f76

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