Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/idlesign/pytakeout
Simplifies Python code extraction
https://github.com/idlesign/pytakeout
extractor python source-extraction
Last synced: 14 days ago
JSON representation
Simplifies Python code extraction
- Host: GitHub
- URL: https://github.com/idlesign/pytakeout
- Owner: idlesign
- License: bsd-3-clause
- Created: 2018-03-15T13:46:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-20T02:42:33.000Z (almost 6 years ago)
- Last Synced: 2024-10-08T18:21:37.121Z (about 1 month ago)
- Topics: extractor, python, source-extraction
- Language: Python
- Homepage: https://github.com/idlesign/pytakeout
- Size: 7.81 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG
- Contributing: CONTRIBUTING
- License: LICENSE
Awesome Lists containing this project
README
pytakeout
=========
https://github.com/idlesign/pytakeout.. image:: https://idlesign.github.io/lbc/py2-lbc.svg
:target: https://idlesign.github.io/lbc/
:alt: LBC Python 2----
|release| |lic| |ci| |coverage| |health|
.. |release| image:: https://img.shields.io/pypi/v/pytakeout.svg
:target: https://pypi.python.org/pypi/pytakeout.. |lic| image:: https://img.shields.io/pypi/l/pytakeout.svg
:target: https://pypi.python.org/pypi/pytakeout.. |ci| image:: https://img.shields.io/travis/idlesign/pytakeout/master.svg
:target: https://travis-ci.org/idlesign/pytakeout.. |coverage| image:: https://img.shields.io/coveralls/idlesign/pytakeout/master.svg
:target: https://coveralls.io/r/idlesign/pytakeout.. |health| image:: https://landscape.io/github/idlesign/pytakeout/master/landscape.svg?style=flat
:target: https://landscape.io/github/idlesign/pytakeout/masterDescription
-----------*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
------.. code-block:: python
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)