Skip to main content

Simplifies Python code extraction

Project description

https://github.com/idlesign/pytakeout

release lic ci coverage health

Description

Simplifies Python code extraction

With this you can easily:

  • extract function/method/class source code;

  • perform basic code transformations;

  • save code into a file.

Sample

from pytakeout import extract_code, code_to_file


def func_to_extract():
    # This function needs to be extracted.
    return True


# Extract code as a string.
code = extract_code(func_to_extract)

# Save it into a temporary file.
tmp_code_file = code_to_file(code)

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

pytakeout-0.1.0.tar.gz (9.7 kB view hashes)

Uploaded Source

Built Distribution

pytakeout-0.1.0-py2.py3-none-any.whl (5.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