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.0.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.0-py2.py3-none-any.whl (7.7 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: injectify-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 70eb95539ecc836623fc042b76bf5f86cfa2574e784d0f5f1c57d6983ead5e20
MD5 a91c5d7c2156e640c1cfbd243f9ad733
BLAKE2b-256 5acf189ff5bb2f68e6af9495082c838a54675817bc38958e477ed13aeffc405d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: injectify-0.1.0-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.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3071ff78afcd7f36f507b3ea29b83cede3c3c58078fd3068bae939d86cfc0414
MD5 013c28a5066d29317f371081f6fa2df2
BLAKE2b-256 e93e1f62c21ed8612e989ec3da86f93d571e2d47bd0810b67696eb3dcc1c5417

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