Skip to main content

Dynamic execution and code manipulation utilities for Python

Project description

pydynamix

A powerful dynamic execution and code manipulation library.

This module provides advanced tools for dynamic code execution, variable management, and metaprogramming capabilities in Python. It enables secret variable storage, dynamic execution with result capture, scope manipulation, lambda creation, and class extension.

Key Features:

  • Secret variable storage and retrieval (setvar, getvar, delvar, clearvars)
  • Dynamic code execution with results (resulted_execution)
  • Scope context management (scope_context)
  • Anonymous function generation (GreatLambda)
  • Class extension and composition (extend)
  • Module export control (export)
  • Custom object construction decorator (constructor)

Classes:

ReadOnly: Contains nested type-only classes for typing purposes. - ExecutionResults: Represents results from dynamic code execution. - Scoper: Provides scope attribute access and management. - ScopeContext: Context manager for scope attribute revelation.

GreatLambda: Builder for creating advanced anonymous functions.

constructor: Decorator for constructing objects via function definitions.

Functions:

  • setvar: Store a variable secretly.
  • getvar: Retrieve a secretly stored variable with optional default.
  • delvar: Delete a specific secret variable by name.
  • clearvars: Clear all secret variables.
  • takevar: Retrieve a secret variable or raise KeyError if not found.
  • resulted_execution: Execute code dynamically and capture execution results.
  • extend: Extend a class with attributes from another class.
  • scope_context: Create a context manager for accessing object attributes.
  • export: Define which variables a module should export.

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

pydynamix-0.1.0.post1.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

pydynamix-0.1.0.post1-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file pydynamix-0.1.0.post1.tar.gz.

File metadata

  • Download URL: pydynamix-0.1.0.post1.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for pydynamix-0.1.0.post1.tar.gz
Algorithm Hash digest
SHA256 53ec06b94d75529534d2f53c1cd232d879034de2efb1d9d0daf055b94c066b4b
MD5 16a95e32eabb35b4f285bf6ba17a9bd9
BLAKE2b-256 e88a49653a76dc0e53cfd39a29030d428e0524f6c743f69fbd88f95d43731b33

See more details on using hashes here.

File details

Details for the file pydynamix-0.1.0.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for pydynamix-0.1.0.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 5168e0d59937da565164fabbfd4933f297dd238db93112c539293f6492275c68
MD5 f108b5280341b7b6bb36a5d9ad4382c6
BLAKE2b-256 06b80496b3780dfef96850b9917c822e0405cd586b99bb2758c25c51ccc9f3a1

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