Skip to main content

Python Code Injection Library

Project description

https://img.shields.io/pypi/l/injectify.svg https://img.shields.io/pypi/v/injectify.svg https://img.shields.io/pypi/pyversions/cookiecutter.svg https://api.travis-ci.com/Maltzur/injectify.svg?branch=master https://codecov.io/gh/Maltzur/injectify/branch/master/graphs/badge.svg?branch=master https://readthedocs.org/projects/injectify/badge/?version=latest https://img.shields.io/scrutinizer/g/Maltzur/injectify.svg

Injectify is a code injection library that allows you to merge code that you have written into code from a seprate package.

Installing

Install and update using pipenv (or pip, of course):

$ pipenv install injectify

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

Features

Injectify can inject the following objects: * classes * functions * nested functions * methods * modules

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.2.0.tar.gz (23.6 kB view hashes)

Uploaded Source

Built Distribution

injectify-0.2.0-py2.py3-none-any.whl (11.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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