Skip to main content

An advanced Python library for creating and executing custom functions dynamically.

Project description

Onkitep

Onkitep is an advanced Python library designed for dynamically creating and executing custom functions.

Features

  • Dynamic Function Creation: Define one or more functions in a single code string and extract the desired function by name.
  • Function Execution: Execute any dynamically created function with provided arguments.
  • Validation: Check if the function code is syntactically correct before execution.

Installation

Install via pip:

pip install onkitep

Usage Here is an example of how to use Onkitep:

import onkitep as okp

# Define multiple functions in a single string
code = """
def greet(name):
    return f'Hello, {name}!'

def farewell(name):
    return f'Goodbye, {name}!'
"""

# Create and execute the 'greet' function
greet_func = okp.create_function("greet", code)
print(okp.execute_function(greet_func, "World"))  # Output: Hello, World!

# Create and execute the 'farewell' function
farewell_func = okp.create_function("farewell", code)
print(okp.execute_function(farewell_func, "World"))  # Output: Goodbye, World!

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

onkitep-1.0.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

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

onkitep-1.0-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file onkitep-1.0.tar.gz.

File metadata

  • Download URL: onkitep-1.0.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for onkitep-1.0.tar.gz
Algorithm Hash digest
SHA256 9804c8dfd28ab28282aa7001e08736cd09bb9984e6702e14d459a2aa677cdf2a
MD5 ccb7d71d7d1ac1f857cee3baaebf2e56
BLAKE2b-256 c1a6ca8959694e4b2c9f0077ce672d1e191e17c3a0ad00bc8c69b41be15a6088

See more details on using hashes here.

File details

Details for the file onkitep-1.0-py3-none-any.whl.

File metadata

  • Download URL: onkitep-1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for onkitep-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 72aff2178869584ba4d5db0889804286c3a366cc1736ab5c005f318ac142f426
MD5 082528200b207bdc4e6ca2b73665724a
BLAKE2b-256 5816ff0993bc62ab2fb9123a2707a70bd8a0e280c2b61b336962d579e2bc1a20

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