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 details)

Uploaded Source

Built Distribution

pytakeout-0.1.0-py2.py3-none-any.whl (5.0 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: pytakeout-0.1.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pytakeout-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b983960c32152b67e768c57cea9e5613f54ee854a287679edd31b4a2864dfa61
MD5 ec0b3ea249b13e6083e50f9ed47c0c0e
BLAKE2b-256 f2ac8686d50bccbfda187eafd38035c1c123291aacb8e555661bbfb7b2d4b126

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pytakeout-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 dbe595ad2e60dcd87640fbae365c355080b741d05a865d197232f985229b8328
MD5 8d10108f38268c50d1acae60cd62a494
BLAKE2b-256 882106cf425b75b87f29f2be50b71e7696402ecd75abf26179e7915ceea13505

See more details on using hashes here.

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